Last active
December 6, 2018 16:14
-
-
Save Knovour/adca7cf4351c5717413d80f070ce0603 to your computer and use it in GitHub Desktop.
eslintrc
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
module.exports = { | |
parser: 'babel-eslint', | |
env: { | |
browser: true, | |
node: true, | |
commonjs: true, | |
jest: true, | |
jquery: true | |
}, | |
extends: 'airbnb-base', | |
globals: { | |
Polymer: true | |
}, | |
plugins: [ | |
'html', | |
'import' | |
], | |
rules: { | |
'arrow-parens': [2, 'as-needed', { requireForBlockBody: false }], | |
'class-methods-use-this': 0, | |
'comma-dangle': 0, | |
'consistent-return': 0, | |
curly: ['error', 'multi-or-nest'], | |
'default-case': 0, | |
'func-names': ['error', 'never'], | |
'global-require': 0, | |
'import/no-extraneous-dependencies': ['error', { | |
devDependencies: ['**/*.test.js', '**/*.spec.js', '*.config.js', '*.config.*.js', '**/*.bundle.js', 'app.js'] | |
}], | |
'import/no-webpack-loader-syntax': 0, | |
indent: ['error', 'tab', { | |
SwitchCase: 1, | |
VariableDeclarator: 1 | |
}], | |
'key-spacing': ['error', { mode: 'minimum' }], | |
'max-len': ['error', 120, { | |
ignoreUrls: true, | |
ignoreStrings: true, | |
ignoreTemplateLiterals: true | |
}], | |
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 2 }], | |
'no-alert': 0, | |
'no-console': ['error', { allow: ['warn', 'error'] }], | |
'no-multi-spaces': ['error', { | |
exceptions: { | |
VariableDeclarator: true, | |
ImportDeclaration: true | |
} | |
}], | |
'no-multiple-empty-lines': ['error', { | |
max: 3, | |
maxBOF: 1 | |
}], | |
'no-plusplus': 0, | |
'no-return-await': 0, | |
'no-tabs': 0, | |
'no-unused-expressions': ['error', { allowTernary: true }], | |
semi: ['error', 'never'] | |
} | |
} |
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
module.exports = { | |
parser: 'vue-eslint-parser', | |
parserOptions: { | |
parser: 'babel-eslint', | |
ecmaVersion: 2017, | |
sourceType: 'module' | |
}, | |
env: { | |
browser: true, | |
node: true, | |
commonjs: true, | |
jest: true | |
}, | |
extends: [ | |
'airbnb-base', | |
'plugin:vue/recommended' | |
], | |
plugins: [ | |
'import', | |
'vue', | |
], | |
rules: { | |
'arrow-parens': [2, 'as-needed', { requireForBlockBody: false }], | |
'class-methods-use-this': 0, | |
'comma-dangle': 0, | |
'consistent-return': 0, | |
curly: ['error', 'multi-or-nest'], | |
'default-case': 0, | |
'func-names': ['error', 'never'], | |
'global-require': 0, | |
'import/extensions': ['error', { | |
js: 'never', | |
vue: 'never' | |
}], | |
'import/no-extraneous-dependencies': ['error', { | |
devDependencies: ['**/*.test.js', '**/*.spec.js'] | |
}], | |
'import/no-webpack-loader-syntax': 0, | |
indent: ['error', 'tab', { | |
SwitchCase: 1, | |
VariableDeclarator: 1 | |
}], | |
'max-len': ['error', 160, { | |
ignoreUrls: true, | |
ignoreStrings: true, | |
ignoreTemplateLiterals: true | |
}], | |
'newline-per-chained-call': ['error', { ignoreChainWithDepth: 2 }], | |
'no-alert': 0, | |
'no-console': ['error', { allow: ['warn', 'error'] }], | |
'no-multi-spaces': ['error', { | |
exceptions: { | |
VariableDeclarator: true, | |
ImportDeclaration: true | |
} | |
}], | |
'no-multiple-empty-lines': ['error', { | |
max: 3, | |
maxBOF: 1 | |
}], | |
'no-param-reassign': ['error', { ignorePropertyModificationsFor: ['state'] }], | |
'no-plusplus': 0, | |
'no-return-assign': 0, | |
'no-return-await': 0, | |
'no-tabs': 0, | |
'no-underscore-dangle': ['error', { allowAfterThis: true }], | |
'no-unused-expressions': ['error', { allowTernary: true }], | |
'object-curly-newline': ['error', { multiline: true }], | |
semi: ['error', 'never'], | |
'space-before-function-paren': ['error', 'always'], | |
'vue/require-default-prop': 0 | |
}, | |
settings: { | |
'import/resolver': { | |
webpack: { | |
config: { | |
resolve: { | |
extensions: ['.js', '.vue'], | |
alias: { '~': resolve(__dirname, 'src') } | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment