Bladeren bron

Slims lint rules & switches to bundler module res

main
Eric Amodio 1 jaar geleden
bovenliggende
commit
7346bde3f1
5 gewijzigde bestanden met toevoegingen van 27 en 28 verwijderingen
  1. +25
    -17
      .eslintrc.base.json
  2. +1
    -0
      package.json
  3. +0
    -1
      src/test/suite/system/trie.test.ts
  4. +0
    -9
      src/webviews/apps/.eslintrc.json
  5. +1
    -1
      tsconfig.base.json

+ 25
- 17
.eslintrc.base.json Bestand weergeven

@ -5,7 +5,6 @@
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier"
@ -24,25 +23,17 @@
"root": true,
"rules": {
"anti-trojan-source/no-bidi": "error",
"arrow-parens": ["off"],
"brace-style": ["off", "stroustrup"],
"consistent-return": "off",
"curly": ["error", "multi-line", "consistent"],
"eol-last": "error",
"linebreak-style": ["error", "unix"],
"new-parens": "error",
"no-console": "off",
"no-constant-condition": ["warn", { "checkLoops": false }],
"no-constant-binary-expression": "error",
"no-caller": "error",
"no-debugger": "off",
"no-dupe-class-members": "off",
"no-else-return": "warn",
"no-empty": ["warn", { "allowEmptyCatch": true }],
"no-eval": "error",
"no-ex-assign": "warn",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-semi": "off",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implied-eval": "error",
@ -50,7 +41,7 @@
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-multi-spaces": "error",
"no-mixed-spaces-and-tabs": "off",
"no-restricted-globals": ["error", "process"],
"no-restricted-imports": [
"error",
@ -98,8 +89,13 @@
"message": "Use @env/ instead"
},
{
"group": ["src/**/*"],
"group": ["src/*"],
"message": "Use relative paths instead"
},
{
"group": ["react-dom"],
"importNames": ["Container"],
"message": "Use our Container instead"
}
]
}
@ -138,10 +134,7 @@
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
"require-atomic-updates": "off",
"semi": ["error", "always"],
"semi-style": ["error", "last"],
"sort-imports": [
"error",
{
@ -153,7 +146,7 @@
],
"yoda": "error",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"import/extensions": ["error", "never"],
"import/extensions": "off",
"import/newline-after-import": "warn",
"import/no-absolute-path": "error",
"import/no-cycle": "off",
@ -326,7 +319,22 @@
{
"files": ["src/env/node/**/*"],
"rules": {
"no-restricted-imports": "off"
"no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["src/*"],
"message": "Use relative paths instead"
},
{
"group": ["react-dom"],
"importNames": ["Container"],
"message": "Use our Container instead"
}
]
}
]
}
}
]

+ 1
- 0
package.json Bestand weergeven

@ -15739,6 +15739,7 @@
"patch-pre": "node ./scripts/applyPreReleasePatch.js",
"prep-release": "node ./scripts/prep-release.js",
"pretty": "prettier --config .prettierrc --log-level warn --write .",
"pretty:check": "prettier --config .prettierrc --check .",
"pub": "vsce publish --yarn",
"pub-pre": "vsce publish --yarn --pre-release",
"rebuild": "yarn run reset && yarn run build",

+ 0
- 1
src/test/suite/system/trie.test.ts Bestand weergeven

@ -5,7 +5,6 @@ import { isLinux } from '../../../env/node/platform';
import { normalizeRepoUri } from '../../../repositories';
import type { UriEntry } from '../../../system/trie';
import { PathEntryTrie, UriEntryTrie, UriTrie } from '../../../system/trie';
// eslint-disable-next-line import/extensions
import paths from './paths.json';
describe('PathEntryTrie Test Suite', () => {

+ 0
- 9
src/webviews/apps/.eslintrc.json Bestand weergeven

@ -3,15 +3,6 @@
"env": {
"browser": true
},
"rules": {
"import/extensions": [
"error",
"never",
{
"js": "always"
}
]
},
"parserOptions": {
"project": "src/webviews/apps/tsconfig.json"
},

+ 1
- 1
tsconfig.base.json Bestand weergeven

@ -8,7 +8,7 @@
"isolatedModules": true,
"lib": ["es2022", "esnext.disposable"],
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "Bundler",
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,

Laden…
Annuleren
Opslaan