diff --git a/.eslintrc.rule-overrides.js b/.eslintrc.rule-overrides.js index 8d37d8e3..8c9c8482 100644 --- a/.eslintrc.rule-overrides.js +++ b/.eslintrc.rule-overrides.js @@ -83,14 +83,6 @@ module.exports = { "warn", { selector: `${prefixes.testRule} > Literal:first-child` } ], - "misc/match-filename/testRule-rule": [ - "warn", - { - format: "kebab-case", - selector: - "VariableDeclarator[id.name=rule] > MemberExpression > Literal.property" - } - ], "misc/no-restricted-syntax/no-sentence-dot": [ "warn", { @@ -227,22 +219,6 @@ module.exports = { trigger: `${prefixes.createRule} > ObjectExpression > Property[key.name=isSuboptions]` } ], - "misc/require-syntax/require-vue-false": [ - "warn", - { - message: 'Prefer "vue: false" option', - selector: `${prefixes.createRule} > ObjectExpression > Property[key.name=create] > ArrowFunctionExpression[params.length<=1]`, - trigger: `${prefixes.createRule} > ObjectExpression > Property[key.name=vue][value.value=true]` - } - ], - "misc/require-syntax/require-vue-true": [ - "warn", - { - message: 'Prefer "vue: true" option', - selector: `${prefixes.createRule} > ObjectExpression > Property[key.name=create] > ArrowFunctionExpression[params.length>=2]`, - trigger: `${prefixes.createRule} > ObjectExpression > Property[key.name=vue][value.value=false]` - } - ], "spellcheck/spell-checker": [ "warn", { ...spellChecker, skipWords: [...spellChecker.skipWords, "inferrable"] } @@ -282,7 +258,6 @@ module.exports = { "name", "fixable", "hasSuggestions", - "vue", "isOptions", "defaultOptions", "isSuboptions", @@ -318,7 +293,7 @@ module.exports = { } }, { - files: "./src/{core,typescript,vue}/base/*", + files: "./src/{core,typescript}/base/*", rules: { "misc/export-matching-filename-only": "off", "misc/sort-statements": [ @@ -351,8 +326,7 @@ module.exports = { } }, { - files: - "./src/{quasar-extension,real-classes,real-config,real-facades,real-fns,real-service-providers,type-essentials}/**", + files: "./src/{project-chore,ts-misc}/**", rules: { "misc/no-restricted-syntax/no-unnecessary-docs": [ "warn", @@ -412,305 +386,6 @@ module.exports = { } ] } - }, - { - files: "./tests/eslintrc/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "eslintrc/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/jest/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "jest/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-config/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-config/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-config/eslintrc/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-config/eslintrc/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-facades/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-facades/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-fns/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-fns/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-fns/jest/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-fns/jest/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-fns/core/array/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-fns/array/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-fns/core/converters/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-fns/converters/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-fns/core/guards/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-fns/guards/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-fns/core/json/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-fns/json/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-fns/core/object/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-fns/object/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-fns/core/program-flow/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-fns/program-flow/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-fns/core/reflect/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-fns/reflect/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/real-fns/core/types/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "real-fns/types/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/quasar-extension/extras/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "quasar-extension/extras/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/quasar-extension/jest/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "quasar-extension/jest/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/quasar-extension/core/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "quasar-extension/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/quasar-extension/vue/script/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "quasar-extension/vue/script/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/quasar-extension/vue/template/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "quasar-extension/vue/template/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/type-essentials/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "type-essentials/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/typescript/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "typescript/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } - }, - { - files: "./tests/vue/**", - rules: { - "misc/match-filename/testRule-rule": [ - "warn", - { - prefix: "vue/", - selector: - "VariableDeclarator[id.name=rule] > .init > Literal.property" - } - ] - } } ] }; diff --git a/.eslintrc.synonyms.js b/.eslintrc.synonyms.js index d3c0a813..c0199be7 100644 --- a/.eslintrc.synonyms.js +++ b/.eslintrc.synonyms.js @@ -5,7 +5,6 @@ module.exports = [ "misc/match-filename/createRule-id", "misc/match-filename/createRule-name", "misc/match-filename/testRule-name", - "misc/match-filename/testRule-rule", "misc/no-restricted-syntax/no-ast", "misc/no-restricted-syntax/no-sentence-dot", "misc/no-restricted-syntax/no-skipped-tests", @@ -20,7 +19,5 @@ module.exports = [ "misc/require-syntax/require-optionTypes", "misc/require-syntax/require-suboptionDescriptions", "misc/require-syntax/require-suboptionTypes", - "misc/require-syntax/require-suboptionsKey", - "misc/require-syntax/require-vue-false", - "misc/require-syntax/require-vue-true" + "misc/require-syntax/require-suboptionsKey" ]; diff --git a/README.md b/README.md index a945fd80..46440e45 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ A collection of ESLint rules for: - JavaScript / TypeScript files - Jest test files -- Vue single-file components (using vue-eslint-parser) ## Installation @@ -45,7 +44,6 @@ module.exports = { - plugin:misc/eslintrc — Rules for ESLint configuration files. - plugin:misc/jest — Rules for Jest test files. - plugin:misc/typescript — Rules for typescript files. -- plugin:misc/vue — Rules for Vue single-file components. ## Rules @@ -132,12 +130,6 @@ module.exports = { - [typescript/prefer-readonly-set](https://iliubinskii.github.io/eslint-plugin-misc/typescript/prefer-readonly-set.html) — Disallows writable sets. - [typescript/require-prop-type-annotation](https://iliubinskii.github.io/eslint-plugin-misc/typescript/require-prop-type-annotation.html) — Requires type annotation for class properties. - [typescript/require-this-void](https://iliubinskii.github.io/eslint-plugin-misc/typescript/require-this-void.html) — Requires "this: void" for static methods. -- [vue/component-name](https://iliubinskii.github.io/eslint-plugin-misc/vue/component-name.html) — Requires using enums instead of string literals. -- [vue/element-contents-spacing](https://iliubinskii.github.io/eslint-plugin-misc/vue/element-contents-spacing.html) — Controls spaces around HTML element contents. -- [vue/no-complex-declarator-type](https://iliubinskii.github.io/eslint-plugin-misc/vue/no-complex-declarator-type.html) — Disallow complex declarator types. -- [vue/no-complex-return-type](https://iliubinskii.github.io/eslint-plugin-misc/vue/no-complex-return-type.html) — Disallow complex function return types. -- [vue/no-readonly-v-model](https://iliubinskii.github.io/eslint-plugin-misc/vue/no-readonly-v-model.html) — Disallows using readonly property as model value. -- [vue/sort-v-bind](https://iliubinskii.github.io/eslint-plugin-misc/vue/sort-v-bind.html) — Sorts "v-bind" directive. ## Synonyms @@ -200,4 +192,3 @@ If you want to apply one rule several times (e.g. restrict several syntaxes), us - sort-eslint-comments — Sort rules in eslint-disable comments. - sort-switch-cases — Sort switch cases. - spell-check — Spell check with international language support based on hunspell spell checker. -- vue/no-warning-comments — Forbide warning comments in `