Last active
June 7, 2018 18:45
-
-
Save thiagofrancisquete/574ea6241a365600d10237aefb896000 to your computer and use it in GitHub Desktop.
configuração padrão do eslint para usar nos arquivos client side da plataforma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://eslint.org/docs/user-guide/configuring | |
module.exports = { | |
root: true, | |
parserOptions: { | |
parser: '' | |
}, | |
env: { | |
browser: true, | |
}, | |
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention | |
extends: ['plugin:vue/essential', 'airbnb-base'], | |
// required to lint *.vue files | |
plugins: [ | |
'vue' | |
], | |
// add your custom rules here | |
rules: { | |
"no-console": 0, | |
// don't require .vue extension when importing | |
'import/extensions': ['error', 'always', { | |
js: 'never', | |
vue: 'never' | |
}], | |
// disallow reassignment of function parameters | |
// disallow parameter object manipulation except for specific exclusions | |
'no-param-reassign': ['error', { | |
props: true, | |
ignorePropertyModificationsFor: [ | |
'state', // for vuex state | |
'acc', // for reduce accumulators | |
'e' // for e.returnvalue | |
] | |
}], | |
// allow optionalDependencies | |
'import/no-extraneous-dependencies': ['error', { | |
optionalDependencies: ['test/unit/index.js'] | |
}], | |
// allow debugger during development | |
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', | |
// tamanho das linhas | |
'max-len':["error", {"code": 200,"comments":200}] | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment