GithubHelp home page GithubHelp logo

eslint-config-airbnb's Introduction

eslint-config-airbnb's People

Contributors

dependabot[bot] avatar linusborg avatar mrstandu33 avatar satouriko avatar sodatea avatar st-sloth avatar torstengoerner avatar visualfanatic avatar yyx990803 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

eslint-config-airbnb's Issues

ESLint hangs because of `import/resolver` setting

ESLint hangs after it finishes the lint successfully:

$ vue-cli-service lint
 DONE  No lint errors found!

I copied the config file into my .eslint.config.js file and tried to comment lines in order to find what leads to the issue.

I find out that it's these 3 lines:

[require.resolve('eslint-import-resolver-webpack')]: {
config: require.resolve('@vue/cli-service/webpack.config.js'),
},

This is my config file:

module.exports = {
  root: true,
  env: {
    node: true,
  },
  plugins: [
    'import',
  ],
  extends: [
    'plugin:vue/recommended',
    '@vue/airbnb', # if I remove this line, the issue is gone
    'plugin:import/errors',
    'plugin:import/warnings',
  ],
  parserOptions: {
    parser: 'babel-eslint',
  },
  rules: {
    'no-use-before-define': 'off',
    'import/extensions': 'off',
    'no-param-reassign': 'off',
    'prefer-destructuring': 'off',
    radix: 'off',
    'max-len': ['warn', 180, 2, {
      ignoreUrls: true,
      ignoreComments: false,
      ignoreRegExpLiterals: true,
      ignoreStrings: true,
      ignoreTemplateLiterals: true,
    }],
    'import/no-extraneous-dependencies': 'off',
    'no-console': 'off',
    'import/no-unresolved': 'off',
    eqeqeq: 'off',
    'vue/this-in-template': 'off',
    'func-names': 'off',
    camelcase: 'off',
    'vue/require-default-prop': 'off',
    'vue/no-mutating-props': 'off',
    'consistent-return': 'off',
    'vue/no-v-html': 'off',
    'no-plusplus': 'off',
    'default-case': 'off',
    'import/prefer-default-export': 'off',
    'no-return-assign': 'off',
    'no-mixed-operators': 'off',
    'no-restricted-globals': 'off',
    'no-useless-escape': 'off',
    'vue/require-prop-types': 'off',
    'vue/no-parsing-error': 'off',
    'import/no-duplicates': 'off',
    'no-undef': 'off',
    'vue/no-unused-components': 'off',
    'guard-for-in': 'off',
    'no-continue': 'off',
    'vue/no-use-v-if-with-v-for': 'off',
    'no-shadow': 'off',
    'array-callback-return': 'off',
    'no-restricted-syntax': 'off',
    'vue/require-v-for-key': 'off',
    'no-useless-concat': 'off',
    'vue/no-template-shadow': 'off',
    'no-fallthrough': 'off',
    'vue/no-unused-vars': 'off',
    'new-cap': 'off',
    'no-nested-ternary': 'off',
    'vue/require-valid-default-prop': 'off',
    'no-async-promise-executor': 'off',
    'no-empty': 'off',
    'vue/return-in-computed-property': 'off',
    'vue/valid-v-for': 'off',
    'no-unused-expressions': 'off',
    'no-prototype-builtins': 'off',
    'prefer-promise-reject-errors': 'off',
    'no-case-declarations': 'off',
    'import/named': 'off',
    'no-underscore-dangle': 'off',
    'vue/component-tags-order': 'off',
  },
};

Packages:

  • Vue 2.5.17
  • Quasar 0.17.26
  • babel-eslint 10.1.0
  • @vue/cli-service 4.5.13
  • @vue/cli-plugin-eslint 4.5.13
  • eslint 7.26.0
  • eslint-config-airbnb-base 14.0.0
  • eslint-loader 3.0.3
  • eslint-plugin-import 2.22.1
  • eslint-plugin-vue 7.9.0
  • @vue/eslint-config-airbnb 5.3.0

Identical peer and dev dependency 'eslint-plugin-vuejs-accessibility'

I ran into a problem where a npm version wouldn't install eslint-plugin-vuejs-accessibility because it is listed as a peer dependency aswell as a devDependency.
Yes, I can fix that with a different npm version.
But it does not seem right to me to define the dependency this way. Listing the identical dependency as peer when it is already a dev dependency does not add anything.

Rules are slow: Takes 5 seconds to fix a file

Here is my lint configuration:

require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
  root: true,
  extends: [
    'plugin:vue/vue3-essential',
    '@vue/eslint-config-airbnb-with-typescript',
    '@vue/eslint-config-airbnb-with-typescript/allow-js-in-vue',
  ],
  rules: {
    'vue/multi-word-component-names': 'off',
    'no-plusplus': 'off',
    'vue/max-len': [
      'error',
      {
        code: 140,
        ignoreUrls: true,
        ignoreHTMLAttributeValues: true,
        ignoreComments: true,
        ignoreTemplateLiterals: true,
        ignoreStrings: true,
      },
    ],
    'vue/max-attributes-per-line': [
      'error',
      {
        singleline: 1,
        multiline: 1,
      },
    ],
    'array-element-newline': [
      'error',
      {
        ArrayExpression: 'consistent',
        ArrayPattern: { minItems: 3 },
      },
    ],
    'no-underscore-dangle': 0,
    'vuejs-accessibility/click-events-have-key-events': 'off',
    'vuejs-accessibility/label-has-for': 'off',
    'vuejs-accessibility/tabindex-no-positive': 'off',
    'vuejs-accessibility/mouse-events-have-key-events': 'off',
    'vuejs-accessibility/interactive-supports-focus': 'off',
    'vuejs-accessibility/anchor-has-content': 'off',
    'vuejs-accessibility/form-control-has-label': 'off',
    'vue/no-mutating-props': 'off',
    'vue/require-default-prop': 'off',
    'vue/no-reserved-component-names': 'off',
    'no-unsafe-optional-chaining': 'off',
    'no-async-promise-executor': 'off',
    'consistent-return': 'off',
    'max-classes-per-file': 'off',
    'default-param-last': 'off',
    '@typescript-eslint/default-param-last': 'off',
    '@typescript-eslint/no-use-before-define': 'off',
    'vuejs-accessibility/iframe-has-title': 'off',
    'import/prefer-default-export': 'off',

    'import/no-cycle': 'off',
    'no-await-in-loop': 'off',
    '@typescript-eslint/naming-convention': 'off',
  },
};

On linting a file .vue it takes almost 6 seconds to finish. While it works fine no a .js or a .ts file.

Output from command:

TIMING=1 DEBUG=eslint:cli-engine pnpm esilnt src/components/index.vue

Loads 289 rules. Are they too many? 2023-07-25T09:42:49.545Z eslint:rules Loading rule 'accessor-pairs' (remaining=289) 2023-07-25T09:42:49.547Z eslint:rules Loading rule 'array-bracket-newline' (remaining=288) 2023-07-25T09:42:49.547Z eslint:rules Loading rule 'array-bracket-spacing' (remaining=287) 2023-07-25T09:42:49.547Z eslint:rules Loading rule 'array-callback-return' (remaining=286) 2023-07-25T09:42:49.548Z eslint:rules Loading rule 'array-element-newline' (remaining=285) 2023-07-25T09:42:49.548Z eslint:rules Loading rule 'arrow-body-style' (remaining=284) 2023-07-25T09:42:49.548Z eslint:rules Loading rule 'arrow-parens' (remaining=283) 2023-07-25T09:42:49.548Z eslint:rules Loading rule 'arrow-spacing' (remaining=282) 2023-07-25T09:42:49.548Z eslint:rules Loading rule 'block-scoped-var' (remaining=281) 2023-07-25T09:42:49.549Z eslint:rules Loading rule 'block-spacing' (remaining=280) 2023-07-25T09:42:49.549Z eslint:rules Loading rule 'brace-style' (remaining=279) 2023-07-25T09:42:49.549Z eslint:rules Loading rule 'callback-return' (remaining=278) 2023-07-25T09:42:49.549Z eslint:rules Loading rule 'camelcase' (remaining=277) 2023-07-25T09:42:49.549Z eslint:rules Loading rule 'capitalized-comments' (remaining=276) 2023-07-25T09:42:49.550Z eslint:rules Loading rule 'class-methods-use-this' (remaining=275) 2023-07-25T09:42:49.550Z eslint:rules Loading rule 'comma-dangle' (remaining=274) 2023-07-25T09:42:49.550Z eslint:rules Loading rule 'comma-spacing' (remaining=273) 2023-07-25T09:42:49.550Z eslint:rules Loading rule 'comma-style' (remaining=272) 2023-07-25T09:42:49.551Z eslint:rules Loading rule 'complexity' (remaining=271) 2023-07-25T09:42:49.551Z eslint:rules Loading rule 'computed-property-spacing' (remaining=270) 2023-07-25T09:42:49.551Z eslint:rules Loading rule 'consistent-return' (remaining=269) 2023-07-25T09:42:49.551Z eslint:rules Loading rule 'consistent-this' (remaining=268) 2023-07-25T09:42:49.551Z eslint:rules Loading rule 'constructor-super' (remaining=267) 2023-07-25T09:42:49.551Z eslint:rules Loading rule 'curly' (remaining=266) 2023-07-25T09:42:49.552Z eslint:rules Loading rule 'default-case' (remaining=265) 2023-07-25T09:42:49.552Z eslint:rules Loading rule 'default-case-last' (remaining=264) 2023-07-25T09:42:49.552Z eslint:rules Loading rule 'default-param-last' (remaining=263) 2023-07-25T09:42:49.552Z eslint:rules Loading rule 'dot-location' (remaining=262) 2023-07-25T09:42:49.552Z eslint:rules Loading rule 'dot-notation' (remaining=261) 2023-07-25T09:42:49.552Z eslint:rules Loading rule 'eol-last' (remaining=260) 2023-07-25T09:42:49.553Z eslint:rules Loading rule 'eqeqeq' (remaining=259) 2023-07-25T09:42:49.553Z eslint:rules Loading rule 'for-direction' (remaining=258) 2023-07-25T09:42:49.553Z eslint:rules Loading rule 'func-call-spacing' (remaining=257) 2023-07-25T09:42:49.554Z eslint:rules Loading rule 'func-name-matching' (remaining=256) 2023-07-25T09:42:49.554Z eslint:rules Loading rule 'func-names' (remaining=255) 2023-07-25T09:42:49.554Z eslint:rules Loading rule 'func-style' (remaining=254) 2023-07-25T09:42:49.555Z eslint:rules Loading rule 'function-call-argument-newline' (remaining=253) 2023-07-25T09:42:49.555Z eslint:rules Loading rule 'function-paren-newline' (remaining=252) 2023-07-25T09:42:49.555Z eslint:rules Loading rule 'generator-star-spacing' (remaining=251) 2023-07-25T09:42:49.555Z eslint:rules Loading rule 'getter-return' (remaining=250) 2023-07-25T09:42:49.556Z eslint:rules Loading rule 'global-require' (remaining=249) 2023-07-25T09:42:49.556Z eslint:rules Loading rule 'grouped-accessor-pairs' (remaining=248) 2023-07-25T09:42:49.556Z eslint:rules Loading rule 'guard-for-in' (remaining=247) 2023-07-25T09:42:49.558Z eslint:rules Loading rule 'handle-callback-err' (remaining=246) 2023-07-25T09:42:49.559Z eslint:rules Loading rule 'id-blacklist' (remaining=245) 2023-07-25T09:42:49.559Z eslint:rules Loading rule 'id-denylist' (remaining=244) 2023-07-25T09:42:49.559Z eslint:rules Loading rule 'id-length' (remaining=243) 2023-07-25T09:42:49.560Z eslint:rules Loading rule 'id-match' (remaining=242) 2023-07-25T09:42:49.560Z eslint:rules Loading rule 'implicit-arrow-linebreak' (remaining=241) 2023-07-25T09:42:49.560Z eslint:rules Loading rule 'indent' (remaining=240) 2023-07-25T09:42:49.565Z eslint:rules Loading rule 'indent-legacy' (remaining=239) 2023-07-25T09:42:49.565Z eslint:rules Loading rule 'init-declarations' (remaining=238) 2023-07-25T09:42:49.566Z eslint:rules Loading rule 'jsx-quotes' (remaining=237) 2023-07-25T09:42:49.566Z eslint:rules Loading rule 'key-spacing' (remaining=236) 2023-07-25T09:42:49.566Z eslint:rules Loading rule 'keyword-spacing' (remaining=235) 2023-07-25T09:42:49.566Z eslint:rules Loading rule 'line-comment-position' (remaining=234) 2023-07-25T09:42:49.567Z eslint:rules Loading rule 'linebreak-style' (remaining=233) 2023-07-25T09:42:49.567Z eslint:rules Loading rule 'lines-around-comment' (remaining=232) 2023-07-25T09:42:49.567Z eslint:rules Loading rule 'lines-around-directive' (remaining=231) 2023-07-25T09:42:49.567Z eslint:rules Loading rule 'lines-between-class-members' (remaining=230) 2023-07-25T09:42:49.567Z eslint:rules Loading rule 'logical-assignment-operators' (remaining=229) 2023-07-25T09:42:49.568Z eslint:rules Loading rule 'max-classes-per-file' (remaining=228) 2023-07-25T09:42:49.568Z eslint:rules Loading rule 'max-depth' (remaining=227) 2023-07-25T09:42:49.568Z eslint:rules Loading rule 'max-len' (remaining=226) 2023-07-25T09:42:49.568Z eslint:rules Loading rule 'max-lines' (remaining=225) 2023-07-25T09:42:49.568Z eslint:rules Loading rule 'max-lines-per-function' (remaining=224) 2023-07-25T09:42:49.569Z eslint:rules Loading rule 'max-nested-callbacks' (remaining=223) 2023-07-25T09:42:49.569Z eslint:rules Loading rule 'max-params' (remaining=222) 2023-07-25T09:42:49.569Z eslint:rules Loading rule 'max-statements' (remaining=221) 2023-07-25T09:42:49.569Z eslint:rules Loading rule 'max-statements-per-line' (remaining=220) 2023-07-25T09:42:49.569Z eslint:rules Loading rule 'multiline-comment-style' (remaining=219) 2023-07-25T09:42:49.569Z eslint:rules Loading rule 'multiline-ternary' (remaining=218) 2023-07-25T09:42:49.570Z eslint:rules Loading rule 'new-cap' (remaining=217) 2023-07-25T09:42:49.570Z eslint:rules Loading rule 'new-parens' (remaining=216) 2023-07-25T09:42:49.570Z eslint:rules Loading rule 'newline-after-var' (remaining=215) 2023-07-25T09:42:49.570Z eslint:rules Loading rule 'newline-before-return' (remaining=214) 2023-07-25T09:42:49.570Z eslint:rules Loading rule 'newline-per-chained-call' (remaining=213) 2023-07-25T09:42:49.570Z eslint:rules Loading rule 'no-alert' (remaining=212) 2023-07-25T09:42:49.571Z eslint:rules Loading rule 'no-array-constructor' (remaining=211) 2023-07-25T09:42:49.571Z eslint:rules Loading rule 'no-async-promise-executor' (remaining=210) 2023-07-25T09:42:49.571Z eslint:rules Loading rule 'no-await-in-loop' (remaining=209) 2023-07-25T09:42:49.571Z eslint:rules Loading rule 'no-bitwise' (remaining=208) 2023-07-25T09:42:49.571Z eslint:rules Loading rule 'no-buffer-constructor' (remaining=207) 2023-07-25T09:42:49.571Z eslint:rules Loading rule 'no-caller' (remaining=206) 2023-07-25T09:42:49.571Z eslint:rules Loading rule 'no-case-declarations' (remaining=205) 2023-07-25T09:42:49.571Z eslint:rules Loading rule 'no-catch-shadow' (remaining=204) 2023-07-25T09:42:49.572Z eslint:rules Loading rule 'no-class-assign' (remaining=203) 2023-07-25T09:42:49.572Z eslint:rules Loading rule 'no-compare-neg-zero' (remaining=202) 2023-07-25T09:42:49.572Z eslint:rules Loading rule 'no-cond-assign' (remaining=201) 2023-07-25T09:42:49.572Z eslint:rules Loading rule 'no-confusing-arrow' (remaining=200) 2023-07-25T09:42:49.572Z eslint:rules Loading rule 'no-console' (remaining=199) 2023-07-25T09:42:49.572Z eslint:rules Loading rule 'no-const-assign' (remaining=198) 2023-07-25T09:42:49.572Z eslint:rules Loading rule 'no-constant-binary-expression' (remaining=197) 2023-07-25T09:42:49.573Z eslint:rules Loading rule 'no-constant-condition' (remaining=196) 2023-07-25T09:42:49.573Z eslint:rules Loading rule 'no-constructor-return' (remaining=195) 2023-07-25T09:42:49.573Z eslint:rules Loading rule 'no-continue' (remaining=194) 2023-07-25T09:42:49.573Z eslint:rules Loading rule 'no-control-regex' (remaining=193) 2023-07-25T09:42:49.574Z eslint:rules Loading rule 'no-debugger' (remaining=192) 2023-07-25T09:42:49.574Z eslint:rules Loading rule 'no-delete-var' (remaining=191) 2023-07-25T09:42:49.575Z eslint:rules Loading rule 'no-div-regex' (remaining=190) 2023-07-25T09:42:49.575Z eslint:rules Loading rule 'no-dupe-args' (remaining=189) 2023-07-25T09:42:49.575Z eslint:rules Loading rule 'no-dupe-class-members' (remaining=188) 2023-07-25T09:42:49.575Z eslint:rules Loading rule 'no-dupe-else-if' (remaining=187) 2023-07-25T09:42:49.575Z eslint:rules Loading rule 'no-dupe-keys' (remaining=186) 2023-07-25T09:42:49.575Z eslint:rules Loading rule 'no-duplicate-case' (remaining=185) 2023-07-25T09:42:49.575Z eslint:rules Loading rule 'no-duplicate-imports' (remaining=184) 2023-07-25T09:42:49.576Z eslint:rules Loading rule 'no-else-return' (remaining=183) 2023-07-25T09:42:49.576Z eslint:rules Loading rule 'no-empty' (remaining=182) 2023-07-25T09:42:49.576Z eslint:rules Loading rule 'no-empty-character-class' (remaining=181) 2023-07-25T09:42:49.576Z eslint:rules Loading rule 'no-empty-function' (remaining=180) 2023-07-25T09:42:49.576Z eslint:rules Loading rule 'no-empty-pattern' (remaining=179) 2023-07-25T09:42:49.576Z eslint:rules Loading rule 'no-empty-static-block' (remaining=178) 2023-07-25T09:42:49.577Z eslint:rules Loading rule 'no-eq-null' (remaining=177) 2023-07-25T09:42:49.577Z eslint:rules Loading rule 'no-eval' (remaining=176) 2023-07-25T09:42:49.577Z eslint:rules Loading rule 'no-ex-assign' (remaining=175) 2023-07-25T09:42:49.577Z eslint:rules Loading rule 'no-extend-native' (remaining=174) 2023-07-25T09:42:49.577Z eslint:rules Loading rule 'no-extra-bind' (remaining=173) 2023-07-25T09:42:49.577Z eslint:rules Loading rule 'no-extra-boolean-cast' (remaining=172) 2023-07-25T09:42:49.578Z eslint:rules Loading rule 'no-extra-label' (remaining=171) 2023-07-25T09:42:49.578Z eslint:rules Loading rule 'no-extra-parens' (remaining=170) 2023-07-25T09:42:49.578Z eslint:rules Loading rule 'no-extra-semi' (remaining=169) 2023-07-25T09:42:49.579Z eslint:rules Loading rule 'no-fallthrough' (remaining=168) 2023-07-25T09:42:49.579Z eslint:rules Loading rule 'no-floating-decimal' (remaining=167) 2023-07-25T09:42:49.579Z eslint:rules Loading rule 'no-func-assign' (remaining=166) 2023-07-25T09:42:49.579Z eslint:rules Loading rule 'no-global-assign' (remaining=165) 2023-07-25T09:42:49.579Z eslint:rules Loading rule 'no-implicit-coercion' (remaining=164) 2023-07-25T09:42:49.579Z eslint:rules Loading rule 'no-implicit-globals' (remaining=163) 2023-07-25T09:42:49.579Z eslint:rules Loading rule 'no-implied-eval' (remaining=162) 2023-07-25T09:42:49.580Z eslint:rules Loading rule 'no-import-assign' (remaining=161) 2023-07-25T09:42:49.580Z eslint:rules Loading rule 'no-inline-comments' (remaining=160) 2023-07-25T09:42:49.580Z eslint:rules Loading rule 'no-inner-declarations' (remaining=159) 2023-07-25T09:42:49.580Z eslint:rules Loading rule 'no-invalid-regexp' (remaining=158) 2023-07-25T09:42:49.580Z eslint:rules Loading rule 'no-invalid-this' (remaining=157) 2023-07-25T09:42:49.581Z eslint:rules Loading rule 'no-irregular-whitespace' (remaining=156) 2023-07-25T09:42:49.581Z eslint:rules Loading rule 'no-iterator' (remaining=155) 2023-07-25T09:42:49.581Z eslint:rules Loading rule 'no-label-var' (remaining=154) 2023-07-25T09:42:49.581Z eslint:rules Loading rule 'no-labels' (remaining=153) 2023-07-25T09:42:49.581Z eslint:rules Loading rule 'no-lone-blocks' (remaining=152) 2023-07-25T09:42:49.581Z eslint:rules Loading rule 'no-lonely-if' (remaining=151) 2023-07-25T09:42:49.581Z eslint:rules Loading rule 'no-loop-func' (remaining=150) 2023-07-25T09:42:49.582Z eslint:rules Loading rule 'no-loss-of-precision' (remaining=149) 2023-07-25T09:42:49.582Z eslint:rules Loading rule 'no-magic-numbers' (remaining=148) 2023-07-25T09:42:49.582Z eslint:rules Loading rule 'no-misleading-character-class' (remaining=147) 2023-07-25T09:42:49.583Z eslint:rules Loading rule 'no-mixed-operators' (remaining=146) 2023-07-25T09:42:49.583Z eslint:rules Loading rule 'no-mixed-requires' (remaining=145) 2023-07-25T09:42:49.584Z eslint:rules Loading rule 'no-mixed-spaces-and-tabs' (remaining=144) 2023-07-25T09:42:49.584Z eslint:rules Loading rule 'no-multi-assign' (remaining=143) 2023-07-25T09:42:49.584Z eslint:rules Loading rule 'no-multi-spaces' (remaining=142) 2023-07-25T09:42:49.584Z eslint:rules Loading rule 'no-multi-str' (remaining=141) 2023-07-25T09:42:49.584Z eslint:rules Loading rule 'no-multiple-empty-lines' (remaining=140) 2023-07-25T09:42:49.584Z eslint:rules Loading rule 'no-native-reassign' (remaining=139) 2023-07-25T09:42:49.584Z eslint:rules Loading rule 'no-negated-condition' (remaining=138) 2023-07-25T09:42:49.585Z eslint:rules Loading rule 'no-negated-in-lhs' (remaining=137) 2023-07-25T09:42:49.585Z eslint:rules Loading rule 'no-nested-ternary' (remaining=136) 2023-07-25T09:42:49.585Z eslint:rules Loading rule 'no-new' (remaining=135) 2023-07-25T09:42:49.585Z eslint:rules Loading rule 'no-new-func' (remaining=134) 2023-07-25T09:42:49.585Z eslint:rules Loading rule 'no-new-native-nonconstructor' (remaining=133) 2023-07-25T09:42:49.585Z eslint:rules Loading rule 'no-new-object' (remaining=132) 2023-07-25T09:42:49.585Z eslint:rules Loading rule 'no-new-require' (remaining=131) 2023-07-25T09:42:49.585Z eslint:rules Loading rule 'no-new-symbol' (remaining=130) 2023-07-25T09:42:49.586Z eslint:rules Loading rule 'no-new-wrappers' (remaining=129) 2023-07-25T09:42:49.586Z eslint:rules Loading rule 'no-nonoctal-decimal-escape' (remaining=128) 2023-07-25T09:42:49.586Z eslint:rules Loading rule 'no-obj-calls' (remaining=127) 2023-07-25T09:42:49.586Z eslint:rules Loading rule 'no-octal' (remaining=126) 2023-07-25T09:42:49.586Z eslint:rules Loading rule 'no-octal-escape' (remaining=125) 2023-07-25T09:42:49.586Z eslint:rules Loading rule 'no-param-reassign' (remaining=124) 2023-07-25T09:42:49.587Z eslint:rules Loading rule 'no-path-concat' (remaining=123) 2023-07-25T09:42:49.587Z eslint:rules Loading rule 'no-plusplus' (remaining=122) 2023-07-25T09:42:49.587Z eslint:rules Loading rule 'no-process-env' (remaining=121) 2023-07-25T09:42:49.587Z eslint:rules Loading rule 'no-process-exit' (remaining=120) 2023-07-25T09:42:49.587Z eslint:rules Loading rule 'no-promise-executor-return' (remaining=119) 2023-07-25T09:42:49.587Z eslint:rules Loading rule 'no-proto' (remaining=118) 2023-07-25T09:42:49.587Z eslint:rules Loading rule 'no-prototype-builtins' (remaining=117) 2023-07-25T09:42:49.587Z eslint:rules Loading rule 'no-redeclare' (remaining=116) 2023-07-25T09:42:49.588Z eslint:rules Loading rule 'no-regex-spaces' (remaining=115) 2023-07-25T09:42:49.588Z eslint:rules Loading rule 'no-restricted-exports' (remaining=114) 2023-07-25T09:42:49.588Z eslint:rules Loading rule 'no-restricted-globals' (remaining=113) 2023-07-25T09:42:49.588Z eslint:rules Loading rule 'no-restricted-imports' (remaining=112) 2023-07-25T09:42:49.589Z eslint:rules Loading rule 'no-restricted-modules' (remaining=111) 2023-07-25T09:42:49.589Z eslint:rules Loading rule 'no-restricted-properties' (remaining=110) 2023-07-25T09:42:49.589Z eslint:rules Loading rule 'no-restricted-syntax' (remaining=109) 2023-07-25T09:42:49.589Z eslint:rules Loading rule 'no-return-assign' (remaining=108) 2023-07-25T09:42:49.589Z eslint:rules Loading rule 'no-return-await' (remaining=107) 2023-07-25T09:42:49.589Z eslint:rules Loading rule 'no-script-url' (remaining=106) 2023-07-25T09:42:49.589Z eslint:rules Loading rule 'no-self-assign' (remaining=105) 2023-07-25T09:42:49.590Z eslint:rules Loading rule 'no-self-compare' (remaining=104) 2023-07-25T09:42:49.590Z eslint:rules Loading rule 'no-sequences' (remaining=103) 2023-07-25T09:42:49.590Z eslint:rules Loading rule 'no-setter-return' (remaining=102) 2023-07-25T09:42:49.590Z eslint:rules Loading rule 'no-shadow' (remaining=101) 2023-07-25T09:42:49.590Z eslint:rules Loading rule 'no-shadow-restricted-names' (remaining=100) 2023-07-25T09:42:49.590Z eslint:rules Loading rule 'no-spaced-func' (remaining=99) 2023-07-25T09:42:49.591Z eslint:rules Loading rule 'no-sparse-arrays' (remaining=98) 2023-07-25T09:42:49.591Z eslint:rules Loading rule 'no-sync' (remaining=97) 2023-07-25T09:42:49.591Z eslint:rules Loading rule 'no-tabs' (remaining=96) 2023-07-25T09:42:49.591Z eslint:rules Loading rule 'no-template-curly-in-string' (remaining=95) 2023-07-25T09:42:49.591Z eslint:rules Loading rule 'no-ternary' (remaining=94) 2023-07-25T09:42:49.591Z eslint:rules Loading rule 'no-this-before-super' (remaining=93) 2023-07-25T09:42:49.591Z eslint:rules Loading rule 'no-throw-literal' (remaining=92) 2023-07-25T09:42:49.591Z eslint:rules Loading rule 'no-trailing-spaces' (remaining=91) 2023-07-25T09:42:49.592Z eslint:rules Loading rule 'no-undef' (remaining=90) 2023-07-25T09:42:49.592Z eslint:rules Loading rule 'no-undef-init' (remaining=89) 2023-07-25T09:42:49.592Z eslint:rules Loading rule 'no-undefined' (remaining=88) 2023-07-25T09:42:49.592Z eslint:rules Loading rule 'no-underscore-dangle' (remaining=87) 2023-07-25T09:42:49.592Z eslint:rules Loading rule 'no-unexpected-multiline' (remaining=86) 2023-07-25T09:42:49.593Z eslint:rules Loading rule 'no-unmodified-loop-condition' (remaining=85) 2023-07-25T09:42:49.593Z eslint:rules Loading rule 'no-unneeded-ternary' (remaining=84) 2023-07-25T09:42:49.593Z eslint:rules Loading rule 'no-unreachable' (remaining=83) 2023-07-25T09:42:49.593Z eslint:rules Loading rule 'no-unreachable-loop' (remaining=82) 2023-07-25T09:42:49.593Z eslint:rules Loading rule 'no-unsafe-finally' (remaining=81) 2023-07-25T09:42:49.594Z eslint:rules Loading rule 'no-unsafe-negation' (remaining=80) 2023-07-25T09:42:49.594Z eslint:rules Loading rule 'no-unsafe-optional-chaining' (remaining=79) 2023-07-25T09:42:49.595Z eslint:rules Loading rule 'no-unused-expressions' (remaining=78) 2023-07-25T09:42:49.595Z eslint:rules Loading rule 'no-unused-labels' (remaining=77) 2023-07-25T09:42:49.595Z eslint:rules Loading rule 'no-unused-private-class-members' (remaining=76) 2023-07-25T09:42:49.595Z eslint:rules Loading rule 'no-unused-vars' (remaining=75) 2023-07-25T09:42:49.595Z eslint:rules Loading rule 'no-use-before-define' (remaining=74) 2023-07-25T09:42:49.596Z eslint:rules Loading rule 'no-useless-backreference' (remaining=73) 2023-07-25T09:42:49.596Z eslint:rules Loading rule 'no-useless-call' (remaining=72) 2023-07-25T09:42:49.596Z eslint:rules Loading rule 'no-useless-catch' (remaining=71) 2023-07-25T09:42:49.596Z eslint:rules Loading rule 'no-useless-computed-key' (remaining=70) 2023-07-25T09:42:49.596Z eslint:rules Loading rule 'no-useless-concat' (remaining=69) 2023-07-25T09:42:49.597Z eslint:rules Loading rule 'no-useless-constructor' (remaining=68) 2023-07-25T09:42:49.597Z eslint:rules Loading rule 'no-useless-escape' (remaining=67) 2023-07-25T09:42:49.597Z eslint:rules Loading rule 'no-useless-rename' (remaining=66) 2023-07-25T09:42:49.597Z eslint:rules Loading rule 'no-useless-return' (remaining=65) 2023-07-25T09:42:49.597Z eslint:rules Loading rule 'no-var' (remaining=64) 2023-07-25T09:42:49.597Z eslint:rules Loading rule 'no-void' (remaining=63) 2023-07-25T09:42:49.598Z eslint:rules Loading rule 'no-warning-comments' (remaining=62) 2023-07-25T09:42:49.598Z eslint:rules Loading rule 'no-whitespace-before-property' (remaining=61) 2023-07-25T09:42:49.598Z eslint:rules Loading rule 'no-with' (remaining=60) 2023-07-25T09:42:49.598Z eslint:rules Loading rule 'nonblock-statement-body-position' (remaining=59) 2023-07-25T09:42:49.598Z eslint:rules Loading rule 'object-curly-newline' (remaining=58) 2023-07-25T09:42:49.598Z eslint:rules Loading rule 'object-curly-spacing' (remaining=57) 2023-07-25T09:42:49.599Z eslint:rules Loading rule 'object-property-newline' (remaining=56) 2023-07-25T09:42:49.599Z eslint:rules Loading rule 'object-shorthand' (remaining=55) 2023-07-25T09:42:49.599Z eslint:rules Loading rule 'one-var' (remaining=54) 2023-07-25T09:42:49.599Z eslint:rules Loading rule 'one-var-declaration-per-line' (remaining=53) 2023-07-25T09:42:49.599Z eslint:rules Loading rule 'operator-assignment' (remaining=52) 2023-07-25T09:42:49.600Z eslint:rules Loading rule 'operator-linebreak' (remaining=51) 2023-07-25T09:42:49.600Z eslint:rules Loading rule 'padded-blocks' (remaining=50) 2023-07-25T09:42:49.600Z eslint:rules Loading rule 'padding-line-between-statements' (remaining=49) 2023-07-25T09:42:49.600Z eslint:rules Loading rule 'prefer-arrow-callback' (remaining=48) 2023-07-25T09:42:49.601Z eslint:rules Loading rule 'prefer-const' (remaining=47) 2023-07-25T09:42:49.601Z eslint:rules Loading rule 'prefer-destructuring' (remaining=46) 2023-07-25T09:42:49.601Z eslint:rules Loading rule 'prefer-exponentiation-operator' (remaining=45) 2023-07-25T09:42:49.601Z eslint:rules Loading rule 'prefer-named-capture-group' (remaining=44) 2023-07-25T09:42:49.601Z eslint:rules Loading rule 'prefer-numeric-literals' (remaining=43) 2023-07-25T09:42:49.602Z eslint:rules Loading rule 'prefer-object-has-own' (remaining=42) 2023-07-25T09:42:49.602Z eslint:rules Loading rule 'prefer-object-spread' (remaining=41) 2023-07-25T09:42:49.602Z eslint:rules Loading rule 'prefer-promise-reject-errors' (remaining=40) 2023-07-25T09:42:49.602Z eslint:rules Loading rule 'prefer-reflect' (remaining=39) 2023-07-25T09:42:49.602Z eslint:rules Loading rule 'prefer-regex-literals' (remaining=38) 2023-07-25T09:42:49.603Z eslint:rules Loading rule 'prefer-rest-params' (remaining=37) 2023-07-25T09:42:49.603Z eslint:rules Loading rule 'prefer-spread' (remaining=36) 2023-07-25T09:42:49.603Z eslint:rules Loading rule 'prefer-template' (remaining=35) 2023-07-25T09:42:49.603Z eslint:rules Loading rule 'quote-props' (remaining=34) 2023-07-25T09:42:49.604Z eslint:rules Loading rule 'quotes' (remaining=33) 2023-07-25T09:42:49.604Z eslint:rules Loading rule 'radix' (remaining=32) 2023-07-25T09:42:49.604Z eslint:rules Loading rule 'require-atomic-updates' (remaining=31) 2023-07-25T09:42:49.604Z eslint:rules Loading rule 'require-await' (remaining=30) 2023-07-25T09:42:49.604Z eslint:rules Loading rule 'require-jsdoc' (remaining=29) 2023-07-25T09:42:49.604Z eslint:rules Loading rule 'require-unicode-regexp' (remaining=28) 2023-07-25T09:42:49.605Z eslint:rules Loading rule 'require-yield' (remaining=27) 2023-07-25T09:42:49.605Z eslint:rules Loading rule 'rest-spread-spacing' (remaining=26) 2023-07-25T09:42:49.605Z eslint:rules Loading rule 'semi' (remaining=25) 2023-07-25T09:42:49.605Z eslint:rules Loading rule 'semi-spacing' (remaining=24) 2023-07-25T09:42:49.605Z eslint:rules Loading rule 'semi-style' (remaining=23) 2023-07-25T09:42:49.605Z eslint:rules Loading rule 'sort-imports' (remaining=22) 2023-07-25T09:42:49.606Z eslint:rules Loading rule 'sort-keys' (remaining=21) 2023-07-25T09:42:49.606Z eslint:rules Loading rule 'sort-vars' (remaining=20) 2023-07-25T09:42:49.606Z eslint:rules Loading rule 'space-before-blocks' (remaining=19) 2023-07-25T09:42:49.606Z eslint:rules Loading rule 'space-before-function-paren' (remaining=18) 2023-07-25T09:42:49.607Z eslint:rules Loading rule 'space-in-parens' (remaining=17) 2023-07-25T09:42:49.607Z eslint:rules Loading rule 'space-infix-ops' (remaining=16) 2023-07-25T09:42:49.607Z eslint:rules Loading rule 'space-unary-ops' (remaining=15) 2023-07-25T09:42:49.607Z eslint:rules Loading rule 'spaced-comment' (remaining=14) 2023-07-25T09:42:49.607Z eslint:rules Loading rule 'strict' (remaining=13) 2023-07-25T09:42:49.607Z eslint:rules Loading rule 'switch-colon-spacing' (remaining=12) 2023-07-25T09:42:49.608Z eslint:rules Loading rule 'symbol-description' (remaining=11) 2023-07-25T09:42:49.608Z eslint:rules Loading rule 'template-curly-spacing' (remaining=10) 2023-07-25T09:42:49.608Z eslint:rules Loading rule 'template-tag-spacing' (remaining=9) 2023-07-25T09:42:49.608Z eslint:rules Loading rule 'unicode-bom' (remaining=8) 2023-07-25T09:42:49.608Z eslint:rules Loading rule 'use-isnan' (remaining=7) 2023-07-25T09:42:49.608Z eslint:rules Loading rule 'valid-jsdoc' (remaining=6) 2023-07-25T09:42:49.610Z eslint:rules Loading rule 'valid-typeof' (remaining=5) 2023-07-25T09:42:49.610Z eslint:rules Loading rule 'vars-on-top' (remaining=4) 2023-07-25T09:42:49.610Z eslint:rules Loading rule 'wrap-iife' (remaining=3) 2023-07-25T09:42:49.611Z eslint:rules Loading rule 'wrap-regex' (remaining=2) 2023-07-25T09:42:49.611Z eslint:rules Loading rule 'yield-star-spacing' (remaining=1) 2023-07-25T09:42:49.611Z eslint:rules Loading rule 'yoda' (remaining=0)
takes about 5 seconds 023-07-25T09:42:50.282Z eslint:cli-engine Lint /Users/shradhan/Documents/Projects/quizizz-frontend/frontend/apps/join/src/components/QuestionReview.vue 2023-07-25T09:42:50.282Z eslint:linter Linting code for /Users/shradhan/Documents/Projects/quizizz-frontend/frontend/apps/join/src/components/QuestionReview.vue (pass 1) 2023-07-25T09:42:50.282Z eslint:linter Verify 2023-07-25T09:42:50.282Z eslint:linter With ConfigArray: /Users/shradhan/Documents/Projects/quizizz-frontend/frontend/apps/join/src/components/QuestionReview.vue 2023-07-25T09:42:50.282Z eslint:linter Apply the processor: 'vue/.vue' 2023-07-25T09:42:50.282Z eslint:linter A code block was found: '(unnamed)' 2023-07-25T09:42:50.283Z eslint:linter Parsing: /Users/shradhan/Documents/Projects/quizizz-frontend/frontend/apps/join/src/components/QuestionReview.vue 2023-07-25T09:42:54.650Z eslint:linter Parsing successful: /Users/shradhan/Documents/Projects/quizizz-frontend/frontend/apps/join/src/components/QuestionReview.vue 2023-07-25T09:42:54.651Z eslint:linter Scope analysis: /Users/shradhan/Documents/Projects/quizizz-frontend/frontend/apps/join/src/components/QuestionReview.vue 2023-07-25T09:42:54.651Z eslint:linter Scope analysis successful: /Users/shradhan/Documents/Projects/quizizz-frontend/frontend/apps/join/src/components/QuestionReview.vue 2023-07-25T09:42:55.232Z eslint:linter Generating fixed text for /Users/shradhan/Documents/Projects/quizizz-frontend/frontend/apps/join/src/components/QuestionReview.vue (pass 1) 2023-07-25T09:42:55.232Z eslint:source-code-fixer Applying fixes 2023-07-25T09:42:55.232Z eslint:source-code-fixer No fixes to apply 2023-07-25T09:42:55.232Z eslint:file-enumerator Complete iterating files: ["src/components/QuestionReview.vue"] 2023-07-25T09:42:55.232Z eslint:cli-engine Linting complete in: 5728ms 2023-07-25T09:42:55.232Z eslint:cli Fix mode enabled - applying fixes Rule | Time (ms) | Relative :---------------------------------|----------:|--------: import/extensions | 197.438 | 36.0% import/no-named-as-default | 165.576 | 30.2% vue/max-len | 47.764 | 8.7% import/no-extraneous-dependencies | 19.981 | 3.6% @typescript-eslint/indent | 16.632 | 3.0% vue/block-lang | 12.919 | 2.4% @typescript-eslint/no-unused-vars | 4.887 | 0.9% no-redeclare | 4.542 | 0.8% vue/comma-spacing | 2.990 | 0.5% vue/max-attributes-per-line | 2.200 | 0.4

create-vue + airbnb gives unresolved path to 'vitest/config'

Using create-vue to scaffold a vue3 JavaScript project with vitest using something like:

npm create [email protected]
yarn add --dev @vue/eslint-config-airbnb
vi vue-project/.eslintrc.cjs

Gives the following yarn lint error (amongst a couple of other, understandable syntax complaints):

vue-project/vitest.config.js
  3:46  error  Unable to resolve path to module 'vitest/config'  import/no-unresolved

However, running yarn vitest works - the import is fine.

I believe this is because the node_modules file is actually vitest/config.d.ts (which exports the js file in dist).
__

As a workaround I've been able to avoid the warning by specifying and adding .d.ts to the resolver's extensions in .eslintrc.cjs:

  settings: {
    'import/resolver': {
      node: {
        extensions: ['.vue', '.js', '.jsx', '.cjs', '.mjs', '.d.ts'],
      },
    },
  },

__

This is something that used to work without needing this extra config (I think when the vitest config in vue-create was placed directly in vite.config.js).

Is this a regression, an unsupported configuration, or have I found the correct fix and it just needs some extra documentation?

Many thanks.

How to disable accessibility?

I'm using:

"@vue/eslint-config-airbnb": "^6.0.0",

for an internal app but I don't want to get nagged by the tons of accessibility rules, how can I still use airbnb defaults but disable accessibility without adding every single rule?

Issue with link on NPM page

@vue/eslint-config-airbnb page on NPM has link to vue-cli repo as a repository link:

image

I expect, that repository link would be https://github.com/vuejs/eslint-config-airbnb.

Came up with the issue when tried to find source code of @vue/eslint-config-airbnb.

Never error `.vue` extensions

Is there a reason that .vue isn't set to never error in the import/extensions configuration? This means that we need to import all Vue components as *.vue but all others (js, etc) without an extension

Support typescript-eslint v7

Upgrading typescript-eslint to v7 breaks. This blocks migrating other dependencies:

  • vue/eslint-config-typescript
  • @typescript-eslint/eslint-plugin
  • @typescript-eslint/parser

Error:

npm ERR! Found: @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR!   dev @typescript-eslint/eslint-plugin@"^7.0.0" from the root project
npm ERR!   @typescript-eslint/eslint-plugin@"^6.16.0" from @vue/[email protected]
npm ERR!   node_modules/@vue/eslint-config-airbnb-with-typescript
npm ERR!     dev @vue/eslint-config-airbnb-with-typescript@"^8.0.0" from the root project
npm ERR!   2 more (@vue/eslint-config-typescript, eslint-config-airbnb-typescript)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev @typescript-eslint/eslint-plugin@"^7.0.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   peer @typescript-eslint/parser@"^7.0.0" from @typescript-eslint/[email protected]
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     dev @typescript-eslint/eslint-plugin@"^7.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Similar to #58.

使用 eslint-config-airbnb 报错问题

应用场景:动态require模块时如下
this.handbook = require(@/assets/md/${newVal}.md);
会出现如下报错
image

【(parameter) newVal: any
Calls to require() should use string literalseslintimport/no-dynamic-require
Unexpected require().eslintglobal-require】
请问如何解决

Support Eslint 9

Since Eslint 9, flat config has to be used: https://eslint.org/docs/latest/use/configure/configuration-files

Right now we have errors like this:

ESLint: 9.0.0

A config object is using the "extends" key, which is not supported in flat config system.

Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array.

Please see the following page for more information:
https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs

Upgrade @eslint-typescript to v6

If I use this package with the latest typescript and vue versions (ie: 5.1.x and 3.3.x) I get this message.

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.1.0

YOUR TYPESCRIPT VERSION: 5.1.6

Please only submit bug reports when using the officially supported version.

But vue's repo's packages.json do not mention any limitations regarding the typescript version to be used with.

Three weeks ago, typescript-eslint released the v6.0.0 and eslint-config-airbnb-typescript followed right after with the v17.1.0.

Unlike what eslint-config-airbnb-typescript did and because of @rushstack/eslint-patch, I personnally think this package should target the latest version only. But if so rules breaking changes should be mentionned in the release and therefore it might need a Major version bump (ie: v8.0.0).

What do you think @sodatea ?

Vue Plugins: no-param-reassign

Hey guys, I'm currently writing some Vue plugins and I've noticed this config blocks Vue for no-param-reassign:

'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e', // for e.returnvalue
],
}],

It states on the documentation that if we want to apply a instance method to be globally usable we should use:

Vue.prototype.$method = ...

However if we want to apply this airbnb config while building a plugin we always need disable it manually.

rules: {
  'no-param-reassign': ['error', {
      props: true,
      ignorePropertyModificationsFor: ['Vue'],
    },
  ],
},

Since this is only applicable on a vue plugin scenario, is it an intentional behavior to block it?

Incorrect check for `defineProps`

I'm extending plugin:vue/vue3-recommended with vue/valid-define-props to valid use of defineProps, and when I extending with @vue/airbnb, I'll get error with defineProps it's not defined:

image

image

Eslint version: 8.8.0
Vscode eslint version: v2.2.2

Missing webpack package dependency when using Yarn

I'm new to yarn and I've started a vue project with Yarn 2 (berry) with PnP and it's complaining about a missing package dependency. I'm happy to submit a pull request my proposed solution, but I figured I'd check here first.

Basic Structure

my-package
├── webpack@^4.43.0
└── @vue/eslint-config-airbnb
    ├── @vue/cli-service@^3.0.0 || ^4.0.0-0 (peer)
    ├── @vue/[email protected] (dev)
    └── eslint-import-resolver-webpack
        └── webpack@>=1.11.0 (peer) 

The Situation

  1. my-package depends on @vue/eslint-config-airbnb.
  2. yarn install elicits the following warning:
@vue/eslint-config-airbnb@npm:5.0.2 [0c8ee] doesn't provide webpack@>=1.11.0 requested by eslint-import-resolver-webpack@npm:0.11.1
  1. eslint-import-resolver-webpack has a peer dependency of "webpack": ">=1.11.0"
  2. @vue/eslint-config-airbnb has:
    1. A dependency of `"eslint-import-resolver-webpack": "^0.11.1"
    2. No dependency of webpack
  3. yarn install in @vue/eslint-config-airbnb elicits the following response:
...
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "webpack@>=1.11.0".
warning " > @vue/[email protected]" has unmet peer dependency "vue-template-compiler@^2.0.0".
[4/4] Building fresh packages...
...

Note: I'm not sure why, vue/[email protected] specifies vue-template-compiler@^2.6.10 as a resolution.

The Proposed Solution

I think that the solution here is to add dev dependencies of webpack@>=1.11.0 and vue-template-compiler@^2.0.0.

Edits

  • Added more lines to warning message, including the dependency on vue-template-compiler.
  • Added vue-template-compiler versions to basic structure
  • Changed proposed solution to add dependencies devDependencies instead of peer dependencies, because it didn't remove the warning.

use eslint-config-airbnb with vite project

I try to use eslint-config-airbnb in a vite vue-ts project.
There is a error when I try to run eslint.

Error: Cannot read config file: (my project path)\node_modules\@vue\eslint-config-airbnb\index.js
Error: Cannot find module '@vue/cli-service/webpack.config.js'

Since it's vite project, I think webpack.config.js isn't required ?

here is the versions for my project
"vite": "^2.4.3",
"@vue/eslint-config-airbnb": "^5.3.0",
"eslint": "^7.19.0",

Is eslint-config-airbnb current support to vue with vite?

Thanks a lot!

Destructing object has error in Eslint 6

Hi,
Destructing object has error in Eslint 6.
Could you update eslint-config-airbnb-base package to latest version?

Code:

    selectLocales() {
      const { [this.locale]: active, ...other } = this.locales;
      return other;
    }
Module build failed (from ./node_modules/eslint-loader/index.js):
TypeError: Cannot read property 'type' of undefined
Occurred while linting /home/user/ProjectWeb/coffee-print-account-client/src/components/Common/
SelectLanguage.vue:66
    at checkDestructured (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint
/lib/rules/no-useless-rename.js:104:43)
    at listeners.(anonymous function).forEach.listener (/home/user/ProjectWeb/coffee-print-acco
unt-client/node_modules/eslint/lib/linter/safe-emitter.js:45:58)
    at Array.forEach (<anonymous>)
    at Object.emit (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint/lib/l
inter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/user/ProjectWeb/coffee-print-account-client/node
_modules/eslint/lib/linter/node-event-generator.js:253:26)
    at NodeEventGenerator.applySelectors (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint/lib/linter/node-event-generator.js:282:22)
    at NodeEventGenerator.enterNode (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint/lib/linter/node-event-generator.js:296:14)
    at CodePathAnalyzer.enterNode (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:646:23)
    at nodeQueue.forEach.traversalInfo (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint/lib/linter/linter.js:935:32)
    at Array.forEach (<anonymous>)
    at runRules (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint/lib/linter/linter.js:930:15)
    at Linter._verifyWithoutProcessors (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint/lib/linter/linter.js:1132:31)
    at preprocess.map (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint/lib/linter/linter.js:1255:29)
    at Array.map (<anonymous>)
    at Linter._verifyWithProcessor (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint/lib/linter/linter.js:1250:65)
    at Linter._verifyWithConfigArray (/home/user/ProjectWeb/coffee-print-account-client/node_modules/eslint/lib/linter/linter.js:1222:25)

 @ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Login.vue?vue&type=script&lang=js& 42:0-68 48:20-34

package.json

"devDependencies": {
   ...
   "@vue/eslint-config-airbnb": "^4.0.1",
    "eslint": "^6.5.0"
   ...
  }

Thank's

Airbnb rules not added to templates

The rules from airbnb are collectively referred to as styleRulesToExtend, and only would be added if they come from eslint-config-airbnb-base/rules/style

const vueStyleRules = {};
styleRulesToExtend.forEach((name) => {
if (baseStyleRules[name]) {
vueStyleRules[`vue/${name}`] = baseStyleRules[name];
}
});

However, a lot of them are not from style.js, for example eqeqeq is located at eslint-config-airbnb-base/rules/best-practices, and this rule would be missing for the <template> part of .vue files.

// Most extension rules in `eslint-plugin-vue` are only wrapped core ESLint rules
// Except for `max-len` and `no-irregular-whitespace`, which are replacements.
const styleRulesToExtend = [
'array-bracket-newline',
'array-bracket-spacing',
'arrow-spacing',
'block-spacing',
'brace-style',
'camelcase',
'comma-dangle',
'comma-spacing',
'comma-style',
'dot-location',
'dot-notation',
'eqeqeq',
'func-call-spacing',
'key-spacing',
'keyword-spacing',
'no-constant-condition',
'no-empty-pattern',
'no-extra-parens',
'no-loss-of-precision',
'no-restricted-syntax',
'no-sparse-arrays',
'no-useless-concat',
'object-curly-newline',
'object-curly-spacing',
'object-property-newline',
'object-shorthand',
'operator-linebreak',
'prefer-template',
'quote-props',
'space-in-parens',
'space-infix-ops',
'space-unary-ops',
'template-curly-spacing',
];

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.