12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- const path = require('path');
- module.exports = {
- root: true,
- parser: 'vue-eslint-parser',
- parserOptions: {
- // Parser that checks the content of the <script> tag
- parser: '@typescript-eslint/parser',
- sourceType: 'module',
- ecmaVersion: 2020,
- ecmaFeatures: {
- jsx: true,
- },
- },
- env: {
- 'vue/setup-compiler-macros': true,
- 'browser': true,
- 'node': true,
- },
- plugins: ['@typescript-eslint'],
- extends: [
- // Airbnb JavaScript Style Guide https://github.com/airbnb/javascript
- 'airbnb-base',
- 'plugin:@typescript-eslint/recommended',
- 'plugin:import/recommended',
- 'plugin:import/typescript',
- 'plugin:vue/vue3-recommended',
- 'plugin:prettier/recommended',
- './.eslintrc-auto-import.json',
- ],
- settings: {
- 'import/resolver': {
- typescript: {
- project: path.resolve(__dirname, './tsconfig.json'),
- },
- },
- },
- rules: {
- // Vue: Recommended rules to be closed or modify
- 'vue/require-default-prop': 0,
- 'vue/singleline-html-element-content-newline': 0,
- 'vue/max-attributes-per-line': 0,
- // Vue: Add extra rules
- 'vue/custom-event-name-casing': [2, 'camelCase'],
- 'vue/no-v-text': 1,
- 'vue/padding-line-between-blocks': 1,
- 'vue/require-direct-export': 1,
- 'vue/no-unused-components': 1,
- 'vue/multi-word-component-names': 0,
- // Allow @ts-ignore comment
- '@typescript-eslint/ban-ts-comment': 0,
- '@typescript-eslint/no-unused-vars': 0,
- '@typescript-eslint/no-empty-function': 1,
- '@typescript-eslint/no-explicit-any': 0,
- 'import/extensions': [
- 1,
- 'ignorePackages',
- {
- js: 'never',
- jsx: 'never',
- ts: 'never',
- tsx: 'never',
- },
- ],
- 'import/no-cycle': 0,
- 'import/prefer-default-export': 1,
- 'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
- 'no-use-before-define': 0,
- 'no-shadow': 0,
- 'no-debugger':'off',
- 'no-param-reassign': 0,
- },
- };
|