2020-04-02 14:15:02 +00:00
|
|
|
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
|
|
|
}]
|
2020-04-02 14:15:02 +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-03 11:02:52 +00:00
|
|
|
}
|
|
|
|
},
|
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,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2020-04-02 14:15:02 +00:00
|
|
|
{
|
|
|
|
files: ['**/*.d.ts'],
|
|
|
|
rules: {
|
2020-04-02 18:24:44 +00:00
|
|
|
'@typescript-eslint/no-useless-constructor': 'error',
|
2020-04-02 14:15:02 +00:00
|
|
|
'no-var': 'off',
|
2020-04-02 18:24:44 +00:00
|
|
|
'no-useless-constructor': 'off',
|
|
|
|
strict: 'off',
|
2020-04-02 14:15:02 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
2015-07-31 15:53:25 +00:00
|
|
|
}
|
2020-04-02 14:15:02 +00:00
|
|
|
|
|
|
|
module.exports = config
|