Skip to content

Commit 4751f02

Browse files
committed
Rename and prune rules files
1 parent 7431bfb commit 4751f02

File tree

4 files changed

+20
-54
lines changed

4 files changed

+20
-54
lines changed

.eslintrc renamed to .eslintrc.json

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@
1818
"root": true,
1919
"rules": {
2020
"new-parens": "error",
21-
"no-async-promise-executor": "off",
22-
"no-console": "off",
2321
"no-constant-condition": ["warn", { "checkLoops": false }],
22+
"no-control-regex": "off",
2423
"no-caller": "error",
25-
"no-case-declarations": "off",
2624
"no-debugger": "warn",
27-
"no-dupe-class-members": "off",
2825
"no-duplicate-imports": "error",
2926
"no-empty": ["warn", { "allowEmptyCatch": true }],
3027
"no-eval": "error",
@@ -37,18 +34,14 @@
3734
"no-implied-eval": "error",
3835
"no-inner-declarations": "error",
3936
"no-lone-blocks": "error",
40-
"no-lonely-if": "off",
4137
"no-loop-func": "error",
42-
"no-multi-spaces": "off",
43-
"no-prototype-builtins": "off",
4438
"no-return-assign": "error",
4539
"no-self-compare": "error",
4640
"no-sequences": "error",
4741
"no-template-curly-in-string": "warn",
4842
"no-throw-literal": "error",
4943
"no-unmodified-loop-condition": "warn",
5044
"no-unneeded-ternary": "error",
51-
"no-use-before-define": "off",
5245
"no-useless-call": "error",
5346
"no-useless-catch": "error",
5447
"no-useless-computed-key": "error",
@@ -58,28 +51,17 @@
5851
"no-useless-return": "off",
5952
"no-var": "error",
6053
"no-with": "error",
61-
"object-shorthand": "off",
6254
"one-var": ["error", "never"],
63-
"prefer-const": "off",
6455
"prefer-numeric-literals": "error",
6556
"prefer-object-spread": "error",
6657
"prefer-rest-params": "error",
6758
"prefer-spread": "error",
6859
"quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
69-
"require-atomic-updates": "off",
7060
"semi": ["error", "always"],
7161
"semi-style": ["error", "last"],
72-
"sort-imports": [
73-
"error",
74-
{
75-
"ignoreCase": true,
76-
"ignoreDeclarationSort": true,
77-
"ignoreMemberSort": false,
78-
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
79-
}
80-
],
8162
"yoda": "error",
8263
"@typescript-eslint/await-thenable": "error",
64+
"@typescript-eslint/ban-ts-comment": "off",
8365
"@typescript-eslint/ban-types": [
8466
"error",
8567
{
@@ -111,9 +93,6 @@
11193
"message": "`{}` actually means \"any non-nullish value\".\n- If you want a type meaning \"any object\", you probably want `object` or `Record<string, unknown>` instead.\n- If you want a type meaning \"any value\", you probably want `unknown` instead.",
11294
"fixWith": "object"
11395
}
114-
// "object": {
115-
// "message": "The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).\nConsider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys."
116-
// }
11796
}
11897
}
11998
],
@@ -124,29 +103,14 @@
124103
"objectLiteralTypeAssertions": "allow-as-parameter"
125104
}
126105
],
127-
"@typescript-eslint/explicit-function-return-type": "off",
128-
"@typescript-eslint/explicit-member-accessibility": "off",
129-
"@typescript-eslint/no-empty-function": "off",
130106
"@typescript-eslint/no-empty-interface": "error",
131-
"@typescript-eslint/no-explicit-any": "off",
132107
"@typescript-eslint/no-implied-eval": "error",
133108
"@typescript-eslint/no-inferrable-types": ["warn", { "ignoreParameters": true, "ignoreProperties": true }],
134109
"@typescript-eslint/no-misused-promises": ["error", { "checksConditionals": false, "checksVoidReturn": false }],
135-
"@typescript-eslint/no-namespace": "off",
136-
"@typescript-eslint/no-non-null-assertion": "off",
137-
"@typescript-eslint/no-parameter-properties": "off",
138-
"@typescript-eslint/no-this-alias": "off",
139-
"@typescript-eslint/no-unnecessary-condition": "off",
140110
"@typescript-eslint/no-unused-expressions": ["warn", { "allowShortCircuit": true }],
141111
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
142-
"@typescript-eslint/no-use-before-define": "off",
143-
"@typescript-eslint/prefer-regexp-exec": "off",
144-
"@typescript-eslint/prefer-nullish-coalescing": "off",
145-
"@typescript-eslint/prefer-optional-chain": "off",
146-
"@typescript-eslint/require-await": "off",
147112
"@typescript-eslint/restrict-plus-operands": "error",
148-
"@typescript-eslint/restrict-template-expressions": "off",
149-
"@typescript-eslint/strict-boolean-expressions": "off",
113+
"@typescript-eslint/triple-slash-reference": "off",
150114
"@typescript-eslint/unbound-method": "off" // Too many bugs right now: https://github.com/typescript-eslint/typescript-eslint/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+unbound-method
151115
}
152116
}

.prettierrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

.prettierrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"tabWidth": 2,
3+
"printWidth": 120,
4+
"useTabs": false,
5+
"bracketSpacing": true,
6+
"bracketSameLine": true,
7+
"trailingComma": "es5",
8+
"overrides": [
9+
{
10+
"files": ".prettierrc",
11+
"options": { "parser": "json" }
12+
}
13+
]
14+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,9 @@
369369
"watch": "webpack --watch --mode development --env esbuild --info-verbosity verbose",
370370
"open-in-browser": "vscode-test-web --extensionDevelopmentPath=. .",
371371
"lint": "eslint . --ext .ts",
372-
"lint-fix": "eslint . --ext .ts --fix && prettier --config .prettierrc 'src/**/*.ts' --write"
372+
"lint-fix": "eslint . --ext .ts --fix && prettier --config .prettierrc.json 'src/**/*.ts' --write",
373+
"prettier": "prettier .",
374+
"prettier-fix": "prettier --write ."
373375
},
374376
"devDependencies": {
375377
"@types/glob": "^7.1.1",

0 commit comments

Comments
 (0)