Update next lint command

This commit is contained in:
Vitaly Rtishchev
2025-09-12 11:18:49 +03:00
parent 929c09edd7
commit f3ab9bddb7
5 changed files with 670 additions and 19 deletions

View File

@ -7,7 +7,7 @@ export const parameters = {
layout: 'fullscreen', layout: 'fullscreen',
options: { options: {
showPanel: false, showPanel: false,
storySort: (a, b) => a.title.localeCompare(b.title, undefined, { numeric: true }), storySort: (a: any, b: any) => a.title.localeCompare(b.title, undefined, { numeric: true }),
}, },
backgrounds: { disable: true }, backgrounds: { disable: true },
}; };

View File

@ -1,11 +1,22 @@
import mantine from 'eslint-config-mantine'; import mantine from 'eslint-config-mantine';
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint'; import tseslint from 'typescript-eslint';
export default tseslint.config( // @ts-check
export default defineConfig(
tseslint.configs.recommended,
...mantine, ...mantine,
{ ignores: ['**/*.{mjs,cjs,js,d.ts,d.mts}'] }, { ignores: ['**/*.{mjs,cjs,js,d.ts,d.mts}', '.next'] },
{ {
files: ['**/*.story.tsx'], files: ['**/*.story.tsx'],
rules: { 'no-console': 'off' }, rules: { 'no-console': 'off' },
},
{
languageOptions: {
parserOptions: {
tsconfigRootDir: process.cwd(),
project: ['./tsconfig.json'],
},
},
} }
); );

View File

@ -9,7 +9,7 @@
"start": "next start", "start": "next start",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"lint": "npm run eslint && npm run stylelint", "lint": "npm run eslint && npm run stylelint",
"eslint": "next lint", "eslint": "eslint .",
"stylelint": "stylelint '**/*.css' --cache", "stylelint": "stylelint '**/*.css' --cache",
"jest": "jest", "jest": "jest",
"jest:watch": "jest --watch", "jest:watch": "jest --watch",
@ -30,6 +30,7 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.28.4", "@babel/core": "^7.28.4",
"@eslint/eslintrc": "^3",
"@eslint/js": "^9.35.0", "@eslint/js": "^9.35.0",
"@ianvs/prettier-plugin-sort-imports": "^4.7.0", "@ianvs/prettier-plugin-sort-imports": "^4.7.0",
"@storybook/addon-themes": "^9.1.5", "@storybook/addon-themes": "^9.1.5",
@ -46,6 +47,7 @@
"babel-loader": "^10.0.0", "babel-loader": "^10.0.0",
"eslint": "^9.35.0", "eslint": "^9.35.0",
"eslint-config-mantine": "^4.0.3", "eslint-config-mantine": "^4.0.3",
"eslint-config-next": "15.5.3",
"eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.5", "eslint-plugin-react": "^7.37.5",
"jest": "^30.1.3", "jest": "^30.1.3",

View File

@ -17,9 +17,14 @@
"incremental": true, "incremental": true,
"paths": { "paths": {
"@/*": ["./*"] "@/*": ["./*"]
}, }
"plugins": [{ "name": "next" }]
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".storybook/main.ts",
".storybook/preview.tsx"
],
"exclude": ["node_modules"] "exclude": ["node_modules"]
} }

657
yarn.lock

File diff suppressed because it is too large Load Diff