Skip to content

Commit a07f2ed

Browse files
committed
add more configs
1 parent 9b433db commit a07f2ed

File tree

4 files changed

+424
-6
lines changed

4 files changed

+424
-6
lines changed

.eslintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ node_modules
88
.prettierignore
99
.yarnrc.yml
1010
*.md
11-
*.json
11+
tsconfig.json
1212
yarn.lock

.eslintrc.js

+21
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,32 @@ module.exports = {
66
},
77
parser: '@typescript-eslint/parser',
88
parserOptions: {
9+
extraFileExtensions: ['.json'],
910
tsconfigRootDir: __dirname,
1011
project: './tsconfig.json',
1112
warnOnUnsupportedTypeScriptVersion: false
1213
},
14+
rules: {
15+
'sort-imports': 'off',
16+
'import/order': 'off',
17+
'simple-import-sort/sort': 'error',
18+
'optimize-regex/optimize-regex': 'warn',
19+
'no-secrets/no-secrets': 'error'
20+
},
21+
settings: {
22+
'json/json-with-comments-files': []
23+
},
1324
plugins: [
1425
'@typescript-eslint',
26+
'json-format',
1527
'eslint-comments',
1628
'no-use-extend-native',
29+
'sonarjs',
30+
'optimize-regex',
31+
'simple-import-sort',
32+
'perf-standard',
33+
'no-secrets',
34+
'security',
1735
'unicorn',
1836
'standard'
1937
],
@@ -25,6 +43,9 @@ module.exports = {
2543
'plugin:promise/recommended',
2644
'plugin:eslint-comments/recommended',
2745
'plugin:no-use-extend-native/recommended',
46+
'plugin:sonarjs/recommended',
47+
'perf-standard',
48+
'plugin:security/recommended',
2849
'plugin:unicorn/recommended',
2950
'standard-with-typescript',
3051
'plugin:@typescript-eslint/recommended',

package.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
"scripts": {
1212
"build": "tsc",
1313
"dev": "nodemon --exec ts-node ./src/main.ts --strict",
14-
"lint": "NODE_OPTIONS=\"--no-warnings\" yarn eslint ./**/*.[tj]s -f compassion",
14+
"lint": "NODE_OPTIONS=\"--no-warnings\" yarn eslint --ext .js,.ts,.json ./**/*.[tj]s(on)? -f compassion",
1515
"lint:fix": "yarn lint --fix",
16-
"lint:pretty": "yarn lint -f pretty"
16+
"lint:pretty": "yarn lint -f pretty",
17+
"lint:mo": "yarn lint -f mo"
1718
},
1819
"dependencies": {
1920
"chalk": "^4.1.0",
@@ -26,16 +27,25 @@
2627
"@typescript-eslint/eslint-plugin": "^3.9.1",
2728
"@typescript-eslint/parser": "^3.9.1",
2829
"eslint": "^7.7.0",
30+
"eslint-config-perf-standard": "^2.1.1",
2931
"eslint-config-prettier": "^6.11.0",
3032
"eslint-config-standard": "^14.1.1",
3133
"eslint-config-standard-with-typescript": "^18.0.2",
3234
"eslint-formatter-compassion": "^1.1.2",
35+
"eslint-formatter-mo": "^1.0.0",
3336
"eslint-formatter-pretty": "^4.0.0",
3437
"eslint-plugin-eslint-comments": "^3.2.0",
3538
"eslint-plugin-import": "^2.22.0",
39+
"eslint-plugin-json-format": "^2.0.1",
40+
"eslint-plugin-no-secrets": "^0.6.8",
3641
"eslint-plugin-no-use-extend-native": "^0.5.0",
3742
"eslint-plugin-node": "^11.1.0",
43+
"eslint-plugin-optimize-regex": "^1.2.0",
44+
"eslint-plugin-perf-standard": "^1.0.3",
3845
"eslint-plugin-promise": "^4.2.1",
46+
"eslint-plugin-security": "^1.4.0",
47+
"eslint-plugin-simple-import-sort": "^5.0.3",
48+
"eslint-plugin-sonarjs": "^0.5.0",
3949
"eslint-plugin-standard": "^4.0.1",
4050
"eslint-plugin-unicorn": "^21.0.0",
4151
"husky": "^4.2.5",

0 commit comments

Comments
 (0)