2018-11-04 11:41:21 -08:00
|
|
|
module.exports = {
|
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
es6: true,
|
|
|
|
node: 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',
|
2020-02-28 01:45:57 -08:00
|
|
|
'plugin:flowtype/recommended',
|
2018-08-22 20:13:25 -07:00
|
|
|
],
|
2018-11-04 11:41:21 -08:00
|
|
|
parser: 'babel-eslint',
|
|
|
|
parserOptions: {
|
|
|
|
sourceType: 'module',
|
|
|
|
ecmaVersion: 8,
|
2018-08-22 20:13:25 -07:00
|
|
|
},
|
2020-02-28 01:45:57 -08:00
|
|
|
plugins: ['flowtype'],
|
2018-11-04 11:41:21 -08:00
|
|
|
rules: {
|
|
|
|
'no-trailing-spaces': ['error'],
|
|
|
|
'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],
|
|
|
|
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'],
|
2020-02-28 01:45:57 -08:00
|
|
|
'flowtype/generic-spacing': [0],
|
2018-08-22 20:13:25 -07:00
|
|
|
},
|
2020-02-03 05:36:35 -08:00
|
|
|
|
|
|
|
// Used to lint the TypeScript type declaration file
|
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ['*.d.ts'],
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
plugins: ['@typescript-eslint'],
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2018-08-22 20:13:25 -07:00
|
|
|
};
|