From 3cb8bcb3e9f5d37b10779e342f2795d5faa22902 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Fri, 3 Nov 2023 22:58:33 -0400 Subject: [PATCH] lint(ags): switch config to json and add no-dupe rule --- devices/wim/config/ags/.eslintrc.json | 42 +++++++++++++++ devices/wim/config/ags/.eslintrc.yml | 76 --------------------------- 2 files changed, 42 insertions(+), 76 deletions(-) create mode 100644 devices/wim/config/ags/.eslintrc.json delete mode 100644 devices/wim/config/ags/.eslintrc.yml diff --git a/devices/wim/config/ags/.eslintrc.json b/devices/wim/config/ags/.eslintrc.json new file mode 100644 index 00000000..62ed041c --- /dev/null +++ b/devices/wim/config/ags/.eslintrc.json @@ -0,0 +1,42 @@ +{ + "env": { + "es2021": true + }, + "extends": "eslint:recommended", + "overrides": [], + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "rules": { + "arrow-parens": ["error", "as-needed"], + "comma-dangle": ["error", "always-multiline"], + "comma-spacing": ["error", { "before": false, "after": true }], + "comma-style": ["error", "last"], + "curly": ["error", "multi-or-nest", "consistent"], + "dot-location": ["error", "property"], + "eol-last": 0, + "indent": ["error", 4, { "SwitchCase": 1 }], + "keyword-spacing": ["error", { "before": true }], + "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }], + "padded-blocks": ["error", "never", { "allowSingleLineBlocks": false }], + "prefer-const": "error", + "quotes": ["error", "single", { "avoidEscape": true }], + "semi": ["error", "always"], + "nonblock-statement-body-position": ["error", "below"], + "no-trailing-spaces": ["error"], + "no-dupe-class-members": 0, + "array-bracket-spacing": ["error", "never"], + "key-spacing": ["error", { "beforeColon": false, "afterColon": true }], + "object-curly-spacing": ["error", "always"], + "no-useless-escape": ["off"] + }, + "globals": { + "ags": "readonly", + "ARGV": "readonly", + "imports": "readonly", + "print": "readonly", + "console": "readonly", + "logError": "readonly" + } +} diff --git a/devices/wim/config/ags/.eslintrc.yml b/devices/wim/config/ags/.eslintrc.yml deleted file mode 100644 index 031da553..00000000 --- a/devices/wim/config/ags/.eslintrc.yml +++ /dev/null @@ -1,76 +0,0 @@ -env: - es2021: true -extends: eslint:recommended -overrides: [] -parserOptions: - ecmaVersion: latest - sourceType: 'module' -rules: - arrow-parens: - - error - - as-needed - comma-dangle: - - error - - always-multiline - comma-spacing: - - error - - before: false - after: true - comma-style: - - error - - last - curly: - - error - - multi-or-nest - - consistent - dot-location: - - error - - property - eol-last: error - indent: - - error - - 4 - - SwitchCase: 1 - keyword-spacing: - - error - - before: true - lines-between-class-members: - - error - - always - - exceptAfterSingleLine: true - padded-blocks: - - error - - never - - allowSingleLineBlocks: false - prefer-const: error - quotes: - - error - - single - - avoidEscape: true - semi: - - error - - always - nonblock-statement-body-position: - - error - - below - no-trailing-spaces: - - error - array-bracket-spacing: - - error - - never - key-spacing: - - error - - beforeColon: false - afterColon: true - object-curly-spacing: - - error - - always - no-useless-escape: - - off -globals: - ags: readonly - ARGV: readonly - imports: readonly - print: readonly - console: readonly - logError: readonly