wip: update eslint config and stash
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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -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
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue