packages: add eslint config
This commit is contained in:
parent
d9431084bb
commit
5770a06d10
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": ["next/core-web-vitals", "next/typescript"]
|
||||
}
|
||||
36
.vscode/settings.json
vendored
Normal file
36
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": "explicit",
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.removeUnusedImports": "explicit"
|
||||
},
|
||||
// "editor.formatOnSave": true,
|
||||
"eslint.lintTask.enable": true,
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"json",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"yaml"
|
||||
],
|
||||
"eslint.workingDirectories": [
|
||||
{
|
||||
"mode": "auto"
|
||||
}
|
||||
],
|
||||
"explorerExclude.backup": {},
|
||||
"files.exclude": {
|
||||
"**/.DS_Store": true,
|
||||
"**/.git": true,
|
||||
"**/.hg": true,
|
||||
"**/.svn": true,
|
||||
"**/CVS": true,
|
||||
"**/node_modules": true,
|
||||
"**/Thumbs.db": true
|
||||
},
|
||||
"tailwindCSS.experimental.classRegex": [
|
||||
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
|
||||
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
|
||||
]
|
||||
}
|
||||
44
eslint.config.mjs
Normal file
44
eslint.config.mjs
Normal file
@ -0,0 +1,44 @@
|
||||
import awesome from '@vchikalkin/eslint-config-awesome';
|
||||
import tailwind from 'eslint-plugin-tailwindcss';
|
||||
|
||||
/**
|
||||
* @type {import("eslint").Linter.Config}
|
||||
*/
|
||||
export default [
|
||||
...tailwind.configs['flat/recommended'],
|
||||
...awesome['react-typescript'],
|
||||
{
|
||||
ignores: ['**/.next/**'],
|
||||
rules: {
|
||||
'@next/next/no-duplicate-head': 'off',
|
||||
'import/extensions': [
|
||||
'error',
|
||||
'ignorePackages',
|
||||
{
|
||||
css: 'always',
|
||||
},
|
||||
],
|
||||
'prettier/prettier': [
|
||||
'error',
|
||||
{
|
||||
arrowParens: 'always',
|
||||
bracketSameLine: false,
|
||||
bracketSpacing: true,
|
||||
endOfLine: 'auto',
|
||||
insertPragma: false,
|
||||
jsxSingleQuote: false,
|
||||
printWidth: 100,
|
||||
proseWrap: 'preserve',
|
||||
quoteProps: 'as-needed',
|
||||
requirePragma: false,
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
tabWidth: 2,
|
||||
trailingComma: 'all',
|
||||
useTabs: false,
|
||||
},
|
||||
{ usePrettierrc: false },
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
11
package.json
11
package.json
@ -9,19 +9,20 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "15.0.4",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"next": "15.0.4"
|
||||
"react-dom": "^19.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"@vchikalkin/eslint-config-awesome": "^2.0.5",
|
||||
"eslint": "^9.16.0",
|
||||
"eslint-plugin-tailwindcss": "^3.17.5",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "15.0.4"
|
||||
"typescript": "^5"
|
||||
},
|
||||
"packageManager": "pnpm@9.14.2+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387"
|
||||
}
|
||||
|
||||
4446
pnpm-lock.yaml
generated
4446
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user