From 1dbd28078772037bccc0815f81169b3f12e4029e Mon Sep 17 00:00:00 2001 From: Amy Parker Date: Mon, 14 Aug 2023 22:03:37 -0700 Subject: [PATCH] add eslint.config.js This patch adds the ESLint configuration file, which was previously ignored. Signed-off-by: Amy Parker --- .gitignore | 3 ++- eslint.config.js | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 eslint.config.js diff --git a/.gitignore b/.gitignore index 148cd1c..61a413f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ _static/ _templates/ *.tar.gz artifacts/ -rpmbuild/ \ No newline at end of file +rpmbuild/ +!eslint.config.js \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..3db4132 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,18 @@ +const tsp = require('@typescript-eslint/eslint-plugin'); +const tsa = require('@typescript-eslint/parser'); + +module.exports = [ + { + files: ["js/*.ts"], + rules: { + semi: "error", + "prefer-const": "error" + }, + plugins: { '@typescript-eslint': tsp }, + languageOptions: { + ecmaVersion: 2015, + sourceType: "module", + parser: tsa + } + } +]; \ No newline at end of file