Skip to content

Commit d7dec68

Browse files
committed
added eslint
1 parent 113cc06 commit d7dec68

File tree

8 files changed

+1278
-110
lines changed

8 files changed

+1278
-110
lines changed

.eslintrc.js

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
module.exports = {
2+
root: true, // Don't look outside this project for inherited configs
3+
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
4+
parserOptions: {
5+
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
6+
sourceType: 'module', // Allows for the use of imports
7+
project: './tsconfig.json'
8+
},
9+
extends: [
10+
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
11+
'plugin:prettier/recommended'
12+
],
13+
plugins: [],
14+
rules: {
15+
indent: 'off',
16+
quotes: [
17+
'error',
18+
'single',
19+
{
20+
avoidEscape: true,
21+
allowTemplateLiterals: true
22+
}
23+
],
24+
'@typescript-eslint/no-parameter-properties': 'off',
25+
'@typescript-eslint/no-explicit-any': 'off',
26+
'@typescript-eslint/no-use-before-define': [
27+
'error',
28+
{
29+
functions: false,
30+
typedefs: false,
31+
classes: false
32+
}
33+
],
34+
'@typescript-eslint/no-unused-vars': [
35+
'error',
36+
{
37+
ignoreRestSiblings: true,
38+
argsIgnorePattern: '^_'
39+
}
40+
],
41+
'@typescript-eslint/explicit-function-return-type': [
42+
'warn',
43+
{
44+
allowExpressions: true,
45+
allowTypedFunctionExpressions: true
46+
}
47+
],
48+
'@typescript-eslint/no-object-literal-type-assertion': 'off',
49+
'@typescript-eslint/interface-name-prefix': 'off',
50+
'@typescript-eslint/no-non-null-assertion': 'off', // This is necessary for Map.has()/get()!
51+
'no-var': 'error',
52+
'prefer-const': 'error',
53+
'no-trailing-spaces': 'error',
54+
curly: 'error',
55+
'brace-style': 'error',
56+
'arrow-parens': ['error', 'as-needed'],
57+
'no-console': 'off',
58+
'no-unused-vars': ['error', { argsIgnorePattern: '^_', caughtErrors: 'all' }],
59+
'no-useless-escape': 'warn',
60+
'no-constant-condition': 'off',
61+
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }],
62+
'no-throw-literal': 'error',
63+
'prefer-promise-reject-errors': 'error',
64+
//"require-await": "error",
65+
'no-return-await': 'error',
66+
eqeqeq: ['error', 'always'],
67+
semi: ['error', 'always'],
68+
'comma-dangle': [
69+
'error',
70+
{
71+
arrays: 'never',
72+
objects: 'never',
73+
imports: 'never',
74+
exports: 'never',
75+
functions: 'ignore'
76+
}
77+
]
78+
},
79+
overrides: [
80+
{
81+
files: ['*.test.ts'],
82+
rules: {
83+
'@typescript-eslint/explicit-function-return-type': 'off'
84+
}
85+
},
86+
{
87+
files: ['**/*.js'],
88+
parser: 'espree'
89+
}
90+
]
91+
};

.prettierrc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 120,
3+
"semi": true,
4+
"tabWidth": 4,
5+
"useTabs": false,
6+
"trailingComma": "none",
7+
"singleQuote": true,
8+
"endOfLine": "lf",
9+
"bracketSpacing": true,
10+
"arrowParens": "avoid",
11+
"quoteProps": "as-needed"
12+
}

build/bring.js

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/bring.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)