updeep-remeda/.eslintrc.js

82 lines
1.7 KiB
JavaScript
Raw Normal View History

const config = {
parserOptions: {
ecmaVersion: 2018,
},
env: {
node: true,
},
2017-04-19 00:55:46 +00:00
"extends": [
2020-04-02 18:24:44 +00:00
"eslint:recommended",
2017-04-19 00:55:46 +00:00
"prettier"
],
"plugins": [
"prettier"
],
2017-04-19 00:47:53 +00:00
"rules": {
"no-confusing-arrow": "off",
"comma-dangle": ["error", {
2020-04-02 18:24:44 +00:00
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
2017-04-19 00:47:53 +00:00
}]
},
overrides: [
2020-04-02 18:24:44 +00:00
{
files: ['lib/**/*'],
env: {
es6: true,
},
parserOptions: {
sourceType: 'module',
},
},
{
files: ['test/**/*'] ,
env: {
mocha: true
},
parserOptions: {
sourceType: 'module',
},
rules: {
2020-04-03 15:27:36 +00:00
"no-unused-expressions": 'off'
}
},
2020-04-02 18:24:44 +00:00
{
files: ['**/*.@(ts|tsx)'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
},
rules: {
'@typescript-eslint/class-name-casing': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
},
},
{
files: ['**/*.d.ts'],
rules: {
2020-04-02 18:24:44 +00:00
'@typescript-eslint/no-useless-constructor': 'error',
'no-var': 'off',
2020-04-02 18:24:44 +00:00
'no-useless-constructor': 'off',
strict: 'off',
},
},
]
2015-07-31 15:53:25 +00:00
}
module.exports = config