2018-11-04 11:41:21 -08:00
|
|
|
module.exports = {
|
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
es6: true,
|
|
|
|
node: true,
|
2021-02-07 08:57:12 -08:00
|
|
|
mocha: true,
|
2018-08-22 20:13:25 -07:00
|
|
|
},
|
2018-11-04 11:41:21 -08:00
|
|
|
extends: [
|
2018-08-22 20:13:25 -07:00
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:import/errors',
|
|
|
|
'plugin:import/warnings',
|
2021-03-14 20:00:43 -07:00
|
|
|
'plugin:import/typescript',
|
2018-08-22 20:13:25 -07:00
|
|
|
],
|
2021-03-14 20:00:43 -07:00
|
|
|
parser: '@typescript-eslint/parser',
|
2018-11-04 11:41:21 -08:00
|
|
|
parserOptions: {
|
|
|
|
sourceType: 'module',
|
|
|
|
ecmaVersion: 8,
|
2018-08-22 20:13:25 -07:00
|
|
|
},
|
2021-03-14 20:00:43 -07:00
|
|
|
plugins: ['@typescript-eslint'],
|
2018-11-04 11:41:21 -08:00
|
|
|
rules: {
|
2021-03-14 20:00:43 -07:00
|
|
|
'@typescript-eslint/no-unused-vars': ['error'],
|
2018-11-04 11:41:21 -08:00
|
|
|
'import/first': ['error'],
|
|
|
|
'import/no-commonjs': ['error'],
|
2018-08-22 20:13:25 -07:00
|
|
|
'import/order': [
|
|
|
|
'error',
|
|
|
|
{
|
2018-11-04 11:41:21 -08:00
|
|
|
groups: [
|
2018-08-22 20:13:25 -07:00
|
|
|
['internal', 'external', 'builtin'],
|
2018-11-04 11:41:21 -08:00
|
|
|
['index', 'sibling', 'parent'],
|
2018-08-22 20:13:25 -07:00
|
|
|
],
|
|
|
|
'newlines-between': 'always',
|
|
|
|
},
|
|
|
|
],
|
2018-11-04 11:41:21 -08:00
|
|
|
indent: [
|
2018-08-22 20:13:25 -07:00
|
|
|
'error',
|
|
|
|
2,
|
2018-11-04 11:41:21 -08:00
|
|
|
{
|
|
|
|
MemberExpression: 1,
|
|
|
|
SwitchCase: 1,
|
|
|
|
},
|
2018-08-22 20:13:25 -07:00
|
|
|
],
|
2018-11-04 11:41:21 -08:00
|
|
|
'linebreak-style': ['error', 'unix'],
|
|
|
|
'no-console': [0],
|
2021-03-14 20:00:43 -07:00
|
|
|
'no-trailing-spaces': ['error'],
|
|
|
|
'no-unused-vars': 'off',
|
2018-11-04 11:41:21 -08:00
|
|
|
quotes: [
|
2018-08-22 20:13:25 -07:00
|
|
|
'error',
|
2018-11-04 11:41:21 -08:00
|
|
|
'single',
|
|
|
|
{avoidEscape: true, allowTemplateLiterals: true},
|
2018-08-22 20:13:25 -07:00
|
|
|
],
|
2018-11-04 11:41:21 -08:00
|
|
|
'require-await': ['error'],
|
|
|
|
semi: ['error', 'always'],
|
2018-08-22 20:13:25 -07:00
|
|
|
},
|
|
|
|
};
|