eslint major version bump
This commit is contained in:
parent
258fb7cd0e
commit
3ddf8f6986
22 changed files with 1488 additions and 1048 deletions
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": ["@pompydev/eslint-config"]
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
extends: ["next/core-web-vitals", "@pompydev/eslint-config"],
|
||||
rules: {
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
},
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/** @type {import("prettier").Options} */
|
||||
module.exports = {
|
||||
...require("@pompydev/prettier-config"),
|
||||
...import("@pompydev/prettier-config"),
|
||||
plugins: ["prettier-plugin-tailwindcss"],
|
||||
}
|
||||
|
|
23
apps/blog/eslint.config.js
Normal file
23
apps/blog/eslint.config.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { FlatCompat } from "@eslint/eslintrc"
|
||||
import pompydevEslintConfig from "@pompydev/eslint-config"
|
||||
import { globalIgnores } from "eslint/config"
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: import.meta.dirname,
|
||||
})
|
||||
|
||||
export default [
|
||||
globalIgnores(["**/.next"]),
|
||||
|
||||
// https://nextjs.org/docs/app/api-reference/config/eslint
|
||||
...compat.config({
|
||||
extends: ["next/core-web-vitals", "next/typescript"],
|
||||
settings: { next: { rootDir: "apps/blog/" } },
|
||||
}),
|
||||
{
|
||||
rules: {
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
},
|
||||
},
|
||||
...pompydevEslintConfig,
|
||||
]
|
|
@ -5,7 +5,7 @@
|
|||
"scripts": {
|
||||
"dev": "open-cli http://localhost:3000 && pnpm dev:headless",
|
||||
"dev:headless": "next dev",
|
||||
"lint": "oxlint && next lint",
|
||||
"lint": "oxlint && eslint .",
|
||||
"build": "next build",
|
||||
"postbuild": "next-sitemap && cp ../../packages/content/dist/rss.xml public/rss.xml",
|
||||
"test:e2e": "playwright test",
|
||||
|
@ -30,11 +30,8 @@
|
|||
"@types/react": "^18.3.1",
|
||||
"@types/react-collapse": "^5.0.4",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||
"@typescript-eslint/parser": "^6.15.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"eslint-config-next": "^14.2.3",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-config-next": "15.2.3",
|
||||
"highlight.js": "^11.9.0",
|
||||
"katex": "^0.16.10",
|
||||
"next": "^14.2.3",
|
||||
|
@ -47,7 +44,6 @@
|
|||
"react-collapse": "^5.1.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"tailwindcss": "^3.4.0",
|
||||
"typescript": "^5.3.3",
|
||||
"zustand": "^4.5.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/** @type {import("prettier").Options} */
|
||||
module.exports = {
|
||||
...require("@pompydev/prettier-config"),
|
||||
export default {
|
||||
...import("@pompydev/prettier-config"),
|
||||
plugins: ["prettier-plugin-tailwindcss"],
|
||||
}
|
4
apps/rank/eslint.config.js
Normal file
4
apps/rank/eslint.config.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
import pompydevEslintConfig from "@pompydev/eslint-config"
|
||||
import { globalIgnores } from "eslint/config"
|
||||
|
||||
export default [globalIgnores(["**/.nuxt/"]), ...pompydevEslintConfig]
|
|
@ -1,13 +0,0 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/package
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Ignore files for PNPM, NPM and YARN
|
||||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": ["@pompydev/eslint-config", "plugin:svelte/recommended"],
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
"ecmaVersion": 2020,
|
||||
"extraFileExtensions": [".svelte"]
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2017": true,
|
||||
"node": true
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.svelte"],
|
||||
"parser": "svelte-eslint-parser"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
const sharedConfig = require("@pompydev/prettier-config")
|
||||
const sharedConfig = import("@pompydev/prettier-config")
|
||||
|
||||
/** @type {import("prettier").Options} */
|
||||
module.exports = {
|
||||
|
|
32
apps/www/eslint.config.js
Normal file
32
apps/www/eslint.config.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
import pompydevEslintConfig from "@pompydev/eslint-config"
|
||||
import { globalIgnores } from "eslint/config"
|
||||
import svelte from "eslint-plugin-svelte"
|
||||
import globals from "globals"
|
||||
import tseslint from "typescript-eslint"
|
||||
|
||||
import svelteConfig from "./svelte.config.js"
|
||||
|
||||
export default [
|
||||
globalIgnores(["**/.svelte-kit/", "vite.config.ts.*"]),
|
||||
...pompydevEslintConfig,
|
||||
...svelte.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["**/*.svelte", "**/*.svelte.js", "**/*.svelte.ts"],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
extraFileExtensions: [".svelte"],
|
||||
parser: tseslint.parser,
|
||||
svelteConfig,
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
|
@ -13,24 +13,21 @@
|
|||
"i_am_sure_i_want_to_nuke_gitignored_files": "rm -rf .turbo .svelte-kit test-results build node_modules vite.config.ts.timestamp-*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fontsource/noto-sans-kr": "^5.0.5",
|
||||
"@inqling/svelte-icons": "^3.5.0",
|
||||
"@playwright/test": "1.50.1",
|
||||
"@pompydev/eslint-config": "workspace:*",
|
||||
"@pompydev/playwright-config": "workspace:*",
|
||||
"@pompydev/prettier-config": "workspace:*",
|
||||
"@pompydev/tailwind-config": "workspace:*",
|
||||
"@fontsource/noto-sans-kr": "^5.0.5",
|
||||
"@inqling/svelte-icons": "^3.5.0",
|
||||
"@playwright/test": "1.50.1",
|
||||
"@sveltejs/adapter-static": "^3.0.5",
|
||||
"@sveltejs/kit": "^2.5.7",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||
"@typescript-eslint/parser": "^6.15.0",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"dayjs": "^1.11.10",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-simple-import-sort": "^10.0.0",
|
||||
"eslint-plugin-svelte": "^2.38.0",
|
||||
"eslint-plugin-svelte": "3.3.1",
|
||||
"globals": "16.0.0",
|
||||
"jest": "^29.7.0",
|
||||
"postcss": "^8.4.32",
|
||||
"postcss-load-config": "^4.0.1",
|
||||
|
@ -42,7 +39,6 @@
|
|||
"tailwindcss": "^3.4.0",
|
||||
"ts-jest": "^29.1.2",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^5.2.10"
|
||||
}
|
||||
}
|
||||
|
|
3
eslint.config.js
Normal file
3
eslint.config.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
import pompydevEslintConfig from "@pompydev/eslint-config"
|
||||
|
||||
export default [...pompydevEslintConfig]
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "pompydev",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "turbo run dev --parallel --continue",
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
extends: ["@pompydev/eslint-config"],
|
||||
}
|
3
packages/content/eslint.config.js
Normal file
3
packages/content/eslint.config.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
import pompydevEslintConfig from "@pompydev/eslint-config"
|
||||
|
||||
export default [...pompydevEslintConfig]
|
|
@ -45,7 +45,6 @@
|
|||
"simple-icons": "^11.13.0",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"tsup": "^8.0.2",
|
||||
"typescript": "^5.3.3",
|
||||
"unified": "^11.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export function createConfig(config: Config): PlaywrightTestConfig {
|
|||
command: "pnpm dev:headless",
|
||||
url: baseURL,
|
||||
timeout: 30 * 1000,
|
||||
// todo: re-enable after updating eslint: eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
reuseExistingServer: !process.env.CI,
|
||||
},
|
||||
|
||||
|
|
2299
pnpm-lock.yaml
generated
2299
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue