1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- module.exports = {
- root: true,
- env: {
- node: true,
- browser: true,
- es6: true
- },
- extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/standard', 'prettier'],
- rules: {
- 'vue/no-parsing-error': [2, {
- "x-invalid-end-tag": false,
- "invalid-first-character-of-tag-name": false
- }],
- 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
- // 不强制使用一致的换行风格
- 'linebreak-style': 0,
- // 不禁用嵌套的三元表达式
- 'no-nested-ternary': 0,
- // 不强制在 parseInt() 使用基数参数
- radix: 0,
- // 不要求 require() 出现在顶层模块作用域中
- 'global-require': 0,
- // 不强制一行的最大长度
- 'max-len': 0,
- // 不禁止对function的参数进行重新赋值
- 'no-param-reassign': 0,
- // 不禁用一元操作将++和--
- 'no-plusplus': 0,
- // 允许使用模板字面量而非字符串连接
- 'prefer-template': 0,
- // 允许出现未使用过的表达式
- 'no-unused-expressions ': 0,
- // 允许变量声明与外层作用域的变量同名
- 'no-shadow': 0,
- 'import/no-unresolved': 0,
- 'import/no-dynamic-require': 0,
- 'import/extensions': 0,
- 'no-mixed-operators': 0,
- 'no-extraneous-dependencies': 0,
- 'prefer-default-export': 0,
- 'comma-dangle': 2,
- semi: 0,
- 'import/no-extraneous-dependencies': 0
- },
- parserOptions: {
- parser: 'babel-eslint',
- sourceType: 'module'
- },
- overrides: [{
- files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
- env: {
- jest: true
- }
- }]
- };
|