initial commit
This commit is contained in:
60
eslint.config.js
Normal file
60
eslint.config.js
Normal file
@@ -0,0 +1,60 @@
|
||||
// import js from '@eslint/js'
|
||||
// import globals from 'globals'
|
||||
// import reactHooks from 'eslint-plugin-react-hooks'
|
||||
// import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
// import tseslint from 'typescript-eslint'
|
||||
// import { globalIgnores } from 'eslint/config'
|
||||
|
||||
// export default tseslint.config([
|
||||
// globalIgnores(['dist']),
|
||||
// {
|
||||
// files: ['**/*.{ts,tsx}'],
|
||||
// extends: [
|
||||
// js.configs.recommended,
|
||||
// tseslint.configs.recommended,
|
||||
// reactHooks.configs['recommended-latest'],
|
||||
// reactRefresh.configs.vite,
|
||||
// ],
|
||||
// languageOptions: {
|
||||
// ecmaVersion: 2020,
|
||||
// globals: globals.browser,
|
||||
// },
|
||||
// },
|
||||
// ])
|
||||
|
||||
import antfu from '@antfu/eslint-config';
|
||||
|
||||
export default antfu(
|
||||
{
|
||||
lessOpinionated: true,
|
||||
|
||||
formatters: true,
|
||||
ignores: ['**/node_modules', '**/dist'],
|
||||
react: true,
|
||||
stylistic: {
|
||||
indent: 2,
|
||||
quotes: 'single',
|
||||
semi: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'antfu/if-newline': 'off',
|
||||
'eslint-comments/no-unlimited-disable': ['off'],
|
||||
'no-console': ['off'],
|
||||
'perfectionist/sort-imports': ['error', {
|
||||
tsconfigRootDir: '.',
|
||||
}],
|
||||
'style/max-statements-per-line': ['error', { max: 2 }],
|
||||
'style/brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
||||
'style/jsx-quotes': ['error', 'prefer-single'],
|
||||
'ts/consistent-type-definitions': ['off'],
|
||||
'ts/no-empty-object-type': ['off'],
|
||||
// 'no-console': ['warn'],
|
||||
// 'no-restricted-syntax': ['error', {
|
||||
// selector: 'CallExpression[callee.property.name=\'forEach\'] > :matches(ArrowFunctionExpression, FunctionExpression)[async=true].arguments',
|
||||
// message: 'Do not use async functions in .forEach()',
|
||||
// }],
|
||||
},
|
||||
},
|
||||
);
|
||||
Reference in New Issue
Block a user