mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-05 21:53:56 +00:00
73 lines
1.5 KiB
JavaScript
73 lines
1.5 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
parserOptions: {
|
|
parser: 'babel-eslint',
|
|
sourceType: 'module'
|
|
},
|
|
env: {
|
|
browser: true,
|
|
node: true,
|
|
'jest/globals': true
|
|
},
|
|
extends: [
|
|
'standard',
|
|
'standard-jsx',
|
|
'plugin:import/errors',
|
|
'plugin:import/warnings',
|
|
"plugin:vue/recommended"
|
|
],
|
|
plugins: [
|
|
'vue',
|
|
'jest'
|
|
],
|
|
settings: {
|
|
'import/resolver': {
|
|
node: { extensions: ['.js', '.mjs'] }
|
|
}
|
|
},
|
|
rules: {
|
|
// Enforce import order
|
|
'import/order': 2,
|
|
|
|
// Imports should come first
|
|
'import/first': 2,
|
|
|
|
// Other import rules
|
|
"import/no-mutable-exports": 2,
|
|
|
|
// Allow unresolved imports
|
|
'import/no-unresolved': 0,
|
|
|
|
// Allow paren-less arrow functions only when there's no braces
|
|
'arrow-parens': [2, 'as-needed', { requireForBlockBody: true }],
|
|
|
|
// Allow async-await
|
|
'generator-star-spacing': 0,
|
|
|
|
// Allow debugger during development
|
|
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
|
|
|
// Prefer const over let
|
|
"prefer-const": ["error", {
|
|
"destructuring": "any",
|
|
"ignoreReadBeforeAssign": false
|
|
}],
|
|
|
|
'dot-notation': 2,
|
|
// Do not allow console.logs etc...
|
|
'no-console': 2,
|
|
'space-before-function-paren': [2, {
|
|
anonymous: 'always',
|
|
named: 'never'
|
|
}],
|
|
'vue/no-parsing-error': [2, {
|
|
'x-invalid-end-tag': false
|
|
}],
|
|
"vue/max-attributes-per-line": [2, {
|
|
"singleline": 5,
|
|
}]
|
|
},
|
|
|
|
globals: {}
|
|
}
|