Skip to content

Commit 7346bde

Browse files
committed
Slims lint rules & switches to bundler module res
1 parent 7a534db commit 7346bde

File tree

5 files changed

+27
-28
lines changed

5 files changed

+27
-28
lines changed

.eslintrc.base.json

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"extends": [
66
"eslint:recommended",
77
"plugin:@typescript-eslint/strict-type-checked",
8-
"plugin:@typescript-eslint/stylistic-type-checked",
98
"plugin:import/recommended",
109
"plugin:import/typescript",
1110
"prettier"
@@ -24,33 +23,25 @@
2423
"root": true,
2524
"rules": {
2625
"anti-trojan-source/no-bidi": "error",
27-
"arrow-parens": ["off"],
28-
"brace-style": ["off", "stroustrup"],
29-
"consistent-return": "off",
30-
"curly": ["error", "multi-line", "consistent"],
31-
"eol-last": "error",
32-
"linebreak-style": ["error", "unix"],
33-
"new-parens": "error",
34-
"no-console": "off",
3526
"no-constant-condition": ["warn", { "checkLoops": false }],
3627
"no-constant-binary-expression": "error",
3728
"no-caller": "error",
3829
"no-debugger": "off",
39-
"no-dupe-class-members": "off",
4030
"no-else-return": "warn",
4131
"no-empty": ["warn", { "allowEmptyCatch": true }],
4232
"no-eval": "error",
4333
"no-ex-assign": "warn",
4434
"no-extend-native": "error",
4535
"no-extra-bind": "error",
36+
"no-extra-semi": "off",
4637
"no-floating-decimal": "error",
4738
"no-implicit-coercion": "error",
4839
"no-implied-eval": "error",
4940
"no-inner-declarations": "off",
5041
"no-lone-blocks": "error",
5142
"no-lonely-if": "error",
5243
"no-loop-func": "error",
53-
"no-multi-spaces": "error",
44+
"no-mixed-spaces-and-tabs": "off",
5445
"no-restricted-globals": ["error", "process"],
5546
"no-restricted-imports": [
5647
"error",
@@ -98,8 +89,13 @@
9889
"message": "Use @env/ instead"
9990
},
10091
{
101-
"group": ["src/**/*"],
92+
"group": ["src/*"],
10293
"message": "Use relative paths instead"
94+
},
95+
{
96+
"group": ["react-dom"],
97+
"importNames": ["Container"],
98+
"message": "Use our Container instead"
10399
}
104100
]
105101
}
@@ -138,10 +134,7 @@
138134
"prefer-rest-params": "error",
139135
"prefer-spread": "error",
140136
"prefer-template": "error",
141-
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
142137
"require-atomic-updates": "off",
143-
"semi": ["error", "always"],
144-
"semi-style": ["error", "last"],
145138
"sort-imports": [
146139
"error",
147140
{
@@ -153,7 +146,7 @@
153146
],
154147
"yoda": "error",
155148
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
156-
"import/extensions": ["error", "never"],
149+
"import/extensions": "off",
157150
"import/newline-after-import": "warn",
158151
"import/no-absolute-path": "error",
159152
"import/no-cycle": "off",
@@ -326,7 +319,22 @@
326319
{
327320
"files": ["src/env/node/**/*"],
328321
"rules": {
329-
"no-restricted-imports": "off"
322+
"no-restricted-imports": [
323+
"error",
324+
{
325+
"patterns": [
326+
{
327+
"group": ["src/*"],
328+
"message": "Use relative paths instead"
329+
},
330+
{
331+
"group": ["react-dom"],
332+
"importNames": ["Container"],
333+
"message": "Use our Container instead"
334+
}
335+
]
336+
}
337+
]
330338
}
331339
}
332340
]

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15739,6 +15739,7 @@
1573915739
"patch-pre": "node ./scripts/applyPreReleasePatch.js",
1574015740
"prep-release": "node ./scripts/prep-release.js",
1574115741
"pretty": "prettier --config .prettierrc --log-level warn --write .",
15742+
"pretty:check": "prettier --config .prettierrc --check .",
1574215743
"pub": "vsce publish --yarn",
1574315744
"pub-pre": "vsce publish --yarn --pre-release",
1574415745
"rebuild": "yarn run reset && yarn run build",

src/test/suite/system/trie.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { isLinux } from '../../../env/node/platform';
55
import { normalizeRepoUri } from '../../../repositories';
66
import type { UriEntry } from '../../../system/trie';
77
import { PathEntryTrie, UriEntryTrie, UriTrie } from '../../../system/trie';
8-
// eslint-disable-next-line import/extensions
98
import paths from './paths.json';
109

1110
describe('PathEntryTrie Test Suite', () => {

src/webviews/apps/.eslintrc.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33
"env": {
44
"browser": true
55
},
6-
"rules": {
7-
"import/extensions": [
8-
"error",
9-
"never",
10-
{
11-
"js": "always"
12-
}
13-
]
14-
},
156
"parserOptions": {
167
"project": "src/webviews/apps/tsconfig.json"
178
},

tsconfig.base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"isolatedModules": true,
99
"lib": ["es2022", "esnext.disposable"],
1010
"module": "esnext",
11-
"moduleResolution": "node",
11+
"moduleResolution": "Bundler",
1212
"noFallthroughCasesInSwitch": true,
1313
"noImplicitOverride": true,
1414
"noImplicitReturns": true,

0 commit comments

Comments
 (0)