Skip to content

Commit 1c283d5

Browse files
committed
fix: lint errors
- Use eslint and replace standard - Fix the lint errors
1 parent 6d54154 commit 1c283d5

File tree

10 files changed

+1210
-1378
lines changed

10 files changed

+1210
-1378
lines changed

.eslintrc.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
plugins: ['@typescript-eslint', 'prettier'],
5+
extends: [
6+
'eslint:recommended',
7+
'plugin:@typescript-eslint/recommended',
8+
'prettier'
9+
],
10+
rules: {
11+
'object-curly-spacing': ['error', 'always'],
12+
'prettier/prettier': 'error',
13+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }]
14+
},
15+
env: {
16+
node: true,
17+
es6: true
18+
},
19+
parserOptions: {
20+
ecmaVersion: 2020,
21+
sourceType: 'module'
22+
},
23+
ignorePatterns: [
24+
'lib/',
25+
'sample/',
26+
'android/',
27+
'ios/',
28+
'*.min.js',
29+
'node_modules/'
30+
]
31+
};

.prettierrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
bracketSpacing: true,
3+
singleQuote: true,
4+
trailingComma: 'es5',
5+
tabWidth: 2,
6+
useTabs: false,
7+
semi: true,
8+
bracketSameLine: false,
9+
arrowParens: 'avoid',
10+
printWidth: 80
11+
};

0 commit comments

Comments
 (0)