summaryrefslogtreecommitdiff
path: root/testenv/linters
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-08-27 01:48:52 +0300
committerMaxim Devaev <[email protected]>2024-08-27 01:48:52 +0300
commit308911191a839a24272b623160bb1628b8ce1880 (patch)
tree88027078c10a06e75b337e0c3f71ee780963cbe1 /testenv/linters
parent0c213add4a8493b262a1cb508abf59a20cb4f459 (diff)
testenv: restored eslint
Diffstat (limited to 'testenv/linters')
-rw-r--r--testenv/linters/eslintrc.js57
-rw-r--r--testenv/linters/eslintrc.yaml36
2 files changed, 57 insertions, 36 deletions
diff --git a/testenv/linters/eslintrc.js b/testenv/linters/eslintrc.js
new file mode 100644
index 00000000..f1923cb7
--- /dev/null
+++ b/testenv/linters/eslintrc.js
@@ -0,0 +1,57 @@
+const js = require("/usr/lib/node_modules/eslint/node_modules/@eslint/js/src/index.js");
+const globals = require("/usr/lib/node_modules/eslint/node_modules/@eslint/eslintrc/node_modules/globals/index.js");
+const parser = require("/usr/lib/node_modules/@babel/eslint-parser/lib/index.cjs");
+
+module.exports = [
+ js.configs.recommended,
+
+ {
+ files: ["**/*.js"],
+ languageOptions: {
+ globals: globals.browser,
+ ecmaVersion: 2015,
+ parser: parser,
+ parserOptions: {
+ ecmaVersion: 2025,
+ sourceType: "module",
+ allowImportExportEverywhere: true,
+ requireConfigFile: false,
+ },
+ },
+ },
+
+ {
+ rules: {
+ indent: [
+ "error",
+ "tab",
+ {SwitchCase: 1},
+ ],
+ "linebreak-style": [
+ "error",
+ "unix",
+ ],
+ quotes: [
+ "error",
+ "double",
+ ],
+ "quote-props": [
+ "error",
+ "always",
+ ],
+ "semi": [
+ "error",
+ "always",
+ ],
+ "comma-dangle": [
+ "error",
+ "always-multiline",
+ ],
+ "no-unused-vars": [
+ "error",
+ {vars: "local", args: "after-used"},
+ ],
+ },
+ },
+
+];
diff --git a/testenv/linters/eslintrc.yaml b/testenv/linters/eslintrc.yaml
deleted file mode 100644
index 90268506..00000000
--- a/testenv/linters/eslintrc.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-env:
- browser: true
- es6: true
-
-extends: "eslint:recommended"
-
-parser: "/usr/lib/node_modules/@babel/eslint-parser"
-parserOptions:
- ecmaVersion: 6
- sourceType: module
- allowImportExportEverywhere: true
- requireConfigFile: false
-
-rules:
- indent:
- - error
- - tab
- - SwitchCase: 1
- linebreak-style:
- - error
- - unix
- quotes:
- - error
- - double
- quote-props:
- - error
- - always
- semi:
- - error
- - always
- comma-dangle:
- - error
- - always-multiline
- no-unused-vars:
- - error
- - {vars: local, args: after-used}