12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- // http://eslint.org/docs/user-guide/configuring
- module.exports = {
- root: true,
- parser: 'babel-eslint',
- parserOptions: {
- sourceType: 'module'
- },
- env: {
- browser: true,
- },
- extends: 'airbnb-base',
- // required to lint *.vue files
- plugins: [
- 'html'
- ],
- // check if imports actually resolve
- 'settings': {
- 'import/resolver': {
- 'webpack': {
- 'config': 'build/webpack.base.conf.js'
- }
- }
- },
- // add your custom rules here
- 'rules': {
- // don't require .vue extension when importing
- 'import/extensions': ['error', 'always', {
- 'js': 'never',
- 'vue': 'never'
- }],
- // allow optionalDependencies
- 'import/no-extraneous-dependencies': ['error', {
- 'optionalDependencies': ['test/unit/index.js']
- }],
- 'no-plusplus': 'off',
- 'no-bitwise': 'off',
- 'no-param-reassign': ['error', { 'props': false }],
- 'semi': ['error', 'never'],
- 'curly': ['warn'],
- 'indent': [
- 'error',
- 2,
- {
- 'SwitchCase': 1,
- 'VariableDeclarator': {
- 'var': 1,
- 'let': 1,
- 'const': 1
- },
- 'MemberExpression': 2
- }
- ],
- 'max-len': ['error', {
- 'code': 256
- }],
- // allow debugger during development
- 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
- }
- }
|