Refactor ESLint configuration and update code formatting: Standardize quotes in eslint.config.mjs, next.config.js, and various TypeScript files for consistency. Add Prettier as a dependency and include formatting scripts in package.json. Clean up unnecessary whitespace in multiple files to enhance code readability.
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
import js from '@eslint/js';
|
||||
import tseslint from '@typescript-eslint/eslint-plugin';
|
||||
import tsparser from '@typescript-eslint/parser';
|
||||
import react from 'eslint-plugin-react';
|
||||
import reactHooks from 'eslint-plugin-react-hooks';
|
||||
import globals from 'globals';
|
||||
import js from "@eslint/js";
|
||||
import tseslint from "@typescript-eslint/eslint-plugin";
|
||||
import tsparser from "@typescript-eslint/parser";
|
||||
import react from "eslint-plugin-react";
|
||||
import reactHooks from "eslint-plugin-react-hooks";
|
||||
import globals from "globals";
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
files: ["**/*.{ts,tsx}"],
|
||||
languageOptions: {
|
||||
parser: tsparser,
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
@@ -21,43 +21,45 @@ export default [
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.browser,
|
||||
React: 'readonly',
|
||||
React: "readonly",
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
'@typescript-eslint': tseslint,
|
||||
"@typescript-eslint": tseslint,
|
||||
react,
|
||||
'react-hooks': reactHooks,
|
||||
"react-hooks": reactHooks,
|
||||
},
|
||||
rules: {
|
||||
...tseslint.configs.recommended.rules,
|
||||
...react.configs.recommended.rules,
|
||||
...reactHooks.configs.recommended.rules,
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
'react/prop-types': 'off',
|
||||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
'react/no-unescaped-entities': 'warn',
|
||||
'react/no-unknown-property': ['error', { ignore: ['jsx'] }],
|
||||
'react-hooks/set-state-in-effect': 'warn',
|
||||
'@typescript-eslint/triple-slash-reference': 'off',
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react/prop-types": "off",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{ argsIgnorePattern: "^_" },
|
||||
],
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"react/no-unescaped-entities": "warn",
|
||||
"react/no-unknown-property": ["error", { ignore: ["jsx"] }],
|
||||
"react-hooks/set-state-in-effect": "warn",
|
||||
"@typescript-eslint/triple-slash-reference": "off",
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
version: "detect",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: [
|
||||
'node_modules/**',
|
||||
'.next/**',
|
||||
'out/**',
|
||||
'build/**',
|
||||
'dist/**',
|
||||
'*.config.js',
|
||||
'prisma/generated/**',
|
||||
"node_modules/**",
|
||||
".next/**",
|
||||
"out/**",
|
||||
"build/**",
|
||||
"dist/**",
|
||||
"*.config.js",
|
||||
"prisma/generated/**",
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user