wip: update eslint config and stash
This commit is contained in:
parent
55ce3618ce
commit
91e411bbaa
@ -1,7 +0,0 @@
|
|||||||
/**/node_modules/*
|
|
||||||
node_modules/
|
|
||||||
|
|
||||||
dist/
|
|
||||||
build/
|
|
||||||
out/
|
|
||||||
.next/
|
|
@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": [
|
|
||||||
"next",
|
|
||||||
"@antfu",
|
|
||||||
"plugin:storybook/recommended"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"@typescript-eslint/consistent-type-definitions": [
|
|
||||||
"error",
|
|
||||||
"type"
|
|
||||||
],
|
|
||||||
"@typescript-eslint/no-var-requires": "off",
|
|
||||||
"no-console": "off",
|
|
||||||
"indent": "off",
|
|
||||||
"@typescript-eslint/indent": [
|
|
||||||
"error",
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
"SwitchCase": 1,
|
|
||||||
"flatTernaryExpressions": false,
|
|
||||||
"ignoredNodes": [
|
|
||||||
"PropertyDefinition[decorators]",
|
|
||||||
"TSUnionType",
|
|
||||||
"FunctionExpression[params]:has(Identifier[decorators])"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"react-hooks/exhaustive-deps": "warn",
|
|
||||||
"react/display-name": "warn"
|
|
||||||
}
|
|
||||||
}
|
|
40
web/eslint.config.mjs
Normal file
40
web/eslint.config.mjs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import antfu from '@antfu/eslint-config'
|
||||||
|
import js from '@eslint/js'
|
||||||
|
import tailwind from 'eslint-plugin-tailwindcss'
|
||||||
|
import ts from 'typescript-eslint'
|
||||||
|
|
||||||
|
const antConfig = await antfu({ jsonc: false })
|
||||||
|
// ...compat.extends("next/core-web-vitals", "next/typescript"),
|
||||||
|
const eslintConfig = [
|
||||||
|
...antConfig,
|
||||||
|
js.configs.recommended,
|
||||||
|
...ts.configs.recommended,
|
||||||
|
...tailwind.configs['flat/recommended'],
|
||||||
|
{
|
||||||
|
settings: {
|
||||||
|
tailwindcss: {
|
||||||
|
// These are the default values but feel free to customize
|
||||||
|
callees: ['classnames', 'clsx', 'ctl', 'cn'],
|
||||||
|
config: 'tailwind.config.js', // returned from `loadConfig()` utility if not provided
|
||||||
|
cssFiles: [
|
||||||
|
'**/*.css',
|
||||||
|
'!**/node_modules',
|
||||||
|
'!**/.*',
|
||||||
|
'!**/dist',
|
||||||
|
'!**/build',
|
||||||
|
],
|
||||||
|
cssFilesRefreshRate: 5_000,
|
||||||
|
removeDuplicates: true,
|
||||||
|
skipClassAttribute: false,
|
||||||
|
whitelist: [],
|
||||||
|
tags: [], // can be set to e.g. ['tw'] for use in tw`bg-blue`
|
||||||
|
classRegex: '^class(Name)?$', // can be modified to support custom attributes. E.g. "^tw$" for `twin.macro`
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ignores: ['node_modules/**', '.next/**', 'build/**', 'dist/**', 'out/**'],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
export default eslintConfig
|
@ -115,8 +115,9 @@
|
|||||||
"zustand": "^4.5.2"
|
"zustand": "^4.5.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^0.36.0",
|
"@antfu/eslint-config": "^4.1.1",
|
||||||
"@chromatic-com/storybook": "^1.9.0",
|
"@chromatic-com/storybook": "^1.9.0",
|
||||||
|
"@eslint/js": "^9.20.0",
|
||||||
"@faker-js/faker": "^7.6.0",
|
"@faker-js/faker": "^7.6.0",
|
||||||
"@rgrove/parse-xml": "^4.1.0",
|
"@rgrove/parse-xml": "^4.1.0",
|
||||||
"@storybook/addon-essentials": "^8.3.5",
|
"@storybook/addon-essentials": "^8.3.5",
|
||||||
@ -152,9 +153,10 @@
|
|||||||
"bing-translate-api": "^4.0.2",
|
"bing-translate-api": "^4.0.2",
|
||||||
"code-inspector-plugin": "^0.18.1",
|
"code-inspector-plugin": "^0.18.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.36.0",
|
"eslint": "^9.19.0",
|
||||||
"eslint-config-next": "^14.0.4",
|
"eslint-config-next": "15.1.6",
|
||||||
"eslint-plugin-storybook": "^0.9.0",
|
"eslint-plugin-storybook": "^0.9.0",
|
||||||
|
"eslint-plugin-tailwindcss": "^3.18.0",
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-environment-jsdom": "^29.7.0",
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
@ -166,6 +168,7 @@
|
|||||||
"tailwindcss": "^3.4.4",
|
"tailwindcss": "^3.4.4",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "4.9.5",
|
"typescript": "4.9.5",
|
||||||
|
"typescript-eslint": "^8.23.0",
|
||||||
"uglify-js": "^3.17.4"
|
"uglify-js": "^3.17.4"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
|
9191
web/yarn.lock
9191
web/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user