Browse Source

Slims lint rules & switches to bundler module res

main
Eric Amodio 1 year ago
parent
commit
7346bde3f1
5 changed files with 27 additions and 28 deletions
  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 View File

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

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

+ 0
- 1
src/test/suite/system/trie.test.ts View File

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

+ 0
- 9
src/webviews/apps/.eslintrc.json View File

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

+ 1
- 1
tsconfig.base.json View File

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

Loading…
Cancel
Save