eslint major version bump
This commit is contained in:
parent
258fb7cd0e
commit
3ddf8f6986
22 changed files with 1488 additions and 1048 deletions
|
@ -1,29 +0,0 @@
|
|||
/** @type {import("eslint").Linter.Config} */
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:oxlint/recommended",
|
||||
// "turbo", // todo: re-enable after updating eslint
|
||||
],
|
||||
ignorePatterns: ["dist/", "build/"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["@typescript-eslint", "import", "simple-import-sort"],
|
||||
rules: {
|
||||
// import related
|
||||
"simple-import-sort/imports": "error",
|
||||
"simple-import-sort/exports": "error",
|
||||
"import/first": "error",
|
||||
"import/newline-after-import": "error",
|
||||
"import/no-anonymous-default-export": "off",
|
||||
"import/no-duplicates": "error",
|
||||
|
||||
// typescript stuff
|
||||
"@typescript-eslint/no-non-null-assertion": "off", // https://typescript-eslint.io/rules/no-non-null-assertion
|
||||
"@typescript-eslint/consistent-type-imports": "error", // https://typescript-eslint.io/rules/consistent-type-imports
|
||||
},
|
||||
}
|
41
packages/eslint-config/eslint.config.mjs
Normal file
41
packages/eslint-config/eslint.config.mjs
Normal file
|
@ -0,0 +1,41 @@
|
|||
import pluginJs from "@eslint/js"
|
||||
import { globalIgnores } from "eslint/config"
|
||||
import pluginImport from "eslint-plugin-import"
|
||||
import pluginOxlint from "eslint-plugin-oxlint"
|
||||
import pluginSimpleImportSort from "eslint-plugin-simple-import-sort"
|
||||
import turbo from "eslint-plugin-turbo"
|
||||
import tseslint from "typescript-eslint"
|
||||
|
||||
export default tseslint.config([
|
||||
globalIgnores(["**/dist/", "**/build/"]),
|
||||
pluginJs.configs.recommended,
|
||||
tseslint.configs.strict,
|
||||
{
|
||||
rules: {
|
||||
"@typescript-eslint/no-non-null-assertion": "off", //https://typescript-eslint.io/rules/no-non-null-assertion
|
||||
"@typescript-eslint/consistent-type-imports": "error", // https://typescript-eslint.io/rules/consistent-type-imports
|
||||
},
|
||||
},
|
||||
turbo.configs["flat/recommended"],
|
||||
{
|
||||
plugins: {
|
||||
import: pluginImport,
|
||||
},
|
||||
rules: {
|
||||
"import/first": "error",
|
||||
"import/newline-after-import": "error",
|
||||
"import/no-anonymous-default-export": "off",
|
||||
"import/no-duplicates": "error",
|
||||
},
|
||||
},
|
||||
{
|
||||
plugins: {
|
||||
"simple-import-sort": pluginSimpleImportSort,
|
||||
},
|
||||
rules: {
|
||||
"simple-import-sort/imports": "error",
|
||||
"simple-import-sort/exports": "error",
|
||||
},
|
||||
},
|
||||
...pluginOxlint.configs["flat/recommended"],
|
||||
])
|
|
@ -2,24 +2,20 @@
|
|||
"name": "@pompydev/eslint-config",
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"main": ".eslintrc.cjs",
|
||||
"main": "eslint.config.mjs",
|
||||
"scripts": {
|
||||
"lint": "oxlint && eslint .eslintrc.cjs",
|
||||
"lint": "oxlint && eslint eslint.config.mjs",
|
||||
"i_am_sure_i_want_to_nuke_gitignored_files": "rm -rf .turbo node_modules"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pompydev/prettier-config": "workspace:*",
|
||||
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||
"@typescript-eslint/parser": "^6.15.0",
|
||||
"eslint": "8.56.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-config-turbo": "2.4.4",
|
||||
"eslint-plugin-json": "^3.1.0",
|
||||
"@eslint/js": "9.22.0",
|
||||
"eslint": "9.22.0",
|
||||
"eslint-plugin-import": "2.31.0",
|
||||
"eslint-plugin-oxlint": "0.16.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-simple-import-sort": "^10.0.0",
|
||||
"eslint-plugin-simple-import-sort": "12.1.1",
|
||||
"eslint-plugin-turbo": "2.4.4",
|
||||
"oxlint": "0.16.0",
|
||||
"typescript": "^5.3.3"
|
||||
"typescript": "5.8.2",
|
||||
"typescript-eslint": "^8.26.1"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue