-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to flat ESLint config
- Loading branch information
1 parent
b3607a5
commit dd91204
Showing
23 changed files
with
1,709 additions
and
1,639 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,41 @@ | ||
{ | ||
// Enable the ESLint flat config support | ||
"eslint.experimental.useFlatConfig": true, | ||
|
||
// Disable the default formatter, use ESLint instead | ||
"prettier.enable": false, | ||
"editor.formatOnSave": false, | ||
|
||
// Auto-fix | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
"source.fixAll.eslint": true, | ||
"source.organizeImports": false | ||
}, | ||
"prettier.enable": false | ||
|
||
// Silent the stylistic rules in you IDE, but still auto-fix them | ||
"eslint.rules.customizations": [ | ||
{ "rule": "style/*", "severity": "off" }, | ||
{ "rule": "*-indent", "severity": "off" }, | ||
{ "rule": "*-spacing", "severity": "off" }, | ||
{ "rule": "*-spaces", "severity": "off" }, | ||
{ "rule": "*-order", "severity": "off" }, | ||
{ "rule": "*-dangle", "severity": "off" }, | ||
{ "rule": "*-newline", "severity": "off" }, | ||
{ "rule": "*quotes", "severity": "off" }, | ||
{ "rule": "*semi", "severity": "off" } | ||
], | ||
|
||
// Enable eslint for all supported languages | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"vue", | ||
"html", | ||
"markdown", | ||
"json", | ||
"jsonc", | ||
"yaml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu( | ||
{ | ||
ignores: ['**/tsconfig.json'], | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "@unlazy/core", | ||
"type": "module", | ||
"version": "0.10.1", | ||
"packageManager": "pnpm@8.7.4", | ||
"packageManager": "pnpm@8.8.0", | ||
"description": "Universal lazy loading library for placeholder images leveraging native browser APIs", | ||
"author": "Johann Schopplich <[email protected]>", | ||
"license": "MIT", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@unlazy/nuxt", | ||
"version": "0.10.1", | ||
"packageManager": "pnpm@8.7.4", | ||
"packageManager": "pnpm@8.8.0", | ||
"description": "Nuxt lazy loading module for placeholder images", | ||
"author": "Johann Schopplich <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -45,16 +45,16 @@ | |
"test:types": "vue-tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"@nuxt/kit": "^3.7.1", | ||
"@nuxt/kit": "^3.7.4", | ||
"defu": "^6.1.2", | ||
"unlazy": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@nuxt/module-builder": "^0.5.1", | ||
"@nuxt/schema": "^3.7.1", | ||
"@types/node": "^20.5.9", | ||
"@unocss/nuxt": "^0.55.7", | ||
"@unocss/reset": "^0.55.7", | ||
"nuxt": "^3.7.1" | ||
"@nuxt/module-builder": "^0.5.2", | ||
"@nuxt/schema": "^3.7.4", | ||
"@types/node": "^20.8.2", | ||
"@unocss/nuxt": "^0.56.5", | ||
"@unocss/reset": "^0.56.5", | ||
"nuxt": "^3.7.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import antfu from '@antfu/eslint-config' | ||
import reactPlugin from 'eslint-plugin-react' | ||
import hooksPlugin from 'eslint-plugin-react-hooks' | ||
|
||
export default antfu( | ||
{ | ||
vue: false, | ||
ignores: ['tsconfig.json'], | ||
}, | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
plugins: { | ||
'react': reactPlugin, | ||
'react-hooks': hooksPlugin, | ||
}, | ||
rules: { | ||
...reactPlugin.configs['jsx-runtime'].rules, | ||
...hooksPlugin.configs.recommended.rules, | ||
}, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "@unlazy/react", | ||
"type": "module", | ||
"version": "0.10.1", | ||
"packageManager": "pnpm@8.7.4", | ||
"packageManager": "pnpm@8.8.0", | ||
"description": "React lazy loading library for placeholder images", | ||
"author": "Johann Schopplich <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -40,16 +40,18 @@ | |
"build": "unbuild", | ||
"dev": "pnpm -C playground run dev", | ||
"dev:build": "pnpm -C playground run build", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"test:types": "tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"unlazy": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.5.9", | ||
"@types/react": "^18.2.21", | ||
"@types/react-dom": "^18.2.7", | ||
"@vitejs/plugin-react": "^4.0.4", | ||
"@types/node": "^20.8.2", | ||
"@types/react": "^18.2.25", | ||
"@types/react-dom": "^18.2.10", | ||
"@vitejs/plugin-react": "^4.1.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import solidPlugin from 'eslint-plugin-solid' | ||
import * as tsParser from '@typescript-eslint/parser' | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu( | ||
{ | ||
vue: false, | ||
ignores: ['tsconfig.json'], | ||
}, | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
plugins: { | ||
solid: solidPlugin, | ||
}, | ||
languageOptions: { | ||
parser: tsParser, | ||
}, | ||
rules: { | ||
...solidPlugin.configs.recommended.rules, | ||
}, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "@unlazy/solid", | ||
"type": "module", | ||
"version": "0.10.1", | ||
"packageManager": "pnpm@8.7.4", | ||
"packageManager": "pnpm@8.8.0", | ||
"description": "Solid lazy loading library for placeholder images", | ||
"author": "Johann Schopplich <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -44,6 +44,8 @@ | |
"build": "tsup", | ||
"dev": "pnpm -C playground run dev", | ||
"dev:build": "pnpm -C playground run build", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"test:types": "tsc --noEmit" | ||
}, | ||
"peerDependencies": { | ||
|
@@ -53,9 +55,9 @@ | |
"unlazy": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.5.9", | ||
"@types/node": "^20.8.2", | ||
"eslint-plugin-solid": "^0.13.0", | ||
"solid-js": "^1.7.11", | ||
"solid-js": "^1.7.12", | ||
"tsup": "^7.2.0", | ||
"tsup-preset-solid": "^2.1.0", | ||
"vite-plugin-solid": "^2.7.0" | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import sveltePlugin from 'eslint-plugin-svelte' | ||
import * as svelteParser from 'svelte-eslint-parser' | ||
import * as tsParser from '@typescript-eslint/parser' | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu( | ||
{ | ||
vue: false, | ||
ignores: ['.svelte-kit', 'tsconfig.json'], | ||
}, | ||
{ | ||
files: ['**/*.svelte'], | ||
plugins: { | ||
svelte: sveltePlugin, | ||
}, | ||
languageOptions: { | ||
parser: svelteParser, | ||
parserOptions: { | ||
extraFileExtensions: ['.svelte'], | ||
parser: tsParser, | ||
}, | ||
}, | ||
rules: { | ||
...sveltePlugin.configs.recommended.rules, | ||
'import/no-mutable-exports': 'off', | ||
'no-undef-init': 'off', | ||
}, | ||
}, | ||
) |
Oops, something went wrong.