70 lines
1.9 KiB
JavaScript
70 lines
1.9 KiB
JavaScript
import eslint from '@eslint/js';
|
|
import nextPlugin from '@next/eslint-plugin-next';
|
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
import prettierPlugin from 'eslint-plugin-prettier';
|
|
import prettierConfig from 'eslint-config-prettier';
|
|
import globals from 'globals';
|
|
|
|
export default [
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
ignores: [
|
|
'node_modules/',
|
|
'.next/',
|
|
'out/',
|
|
// out-of-scope for Story 1.2
|
|
'src/app/admin/**',
|
|
'src/pages_legacy_backup/**',
|
|
'src/app/api/**',
|
|
'src/app/blog/**',
|
|
'src/app/contact/**',
|
|
'src/app/privacy/**',
|
|
'src/app/sentry-example-page/**',
|
|
'src/app/robots.ts',
|
|
'src/app/manifest.ts',
|
|
'src/instrumentation.ts',
|
|
'src/components/ui/sparkles.tsx',
|
|
'src/hooks/use-toast.ts',
|
|
'src/lib/assets.ts',
|
|
'src/lib/auth.ts',
|
|
'src/app/projects/**',
|
|
'src/types/**/*.d.ts',
|
|
],
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
project: './tsconfig.json',
|
|
},
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tsPlugin,
|
|
'@next/next': nextPlugin,
|
|
prettier: prettierPlugin,
|
|
},
|
|
rules: {
|
|
...eslint.configs.recommended.rules,
|
|
...tsPlugin.configs.recommended.rules,
|
|
...nextPlugin.configs.recommended.rules,
|
|
...nextPlugin.configs['core-web-vitals'].rules,
|
|
...prettierConfig.rules,
|
|
'prettier/prettier': 'error',
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
'no-console': 'warn',
|
|
'react/prop-types': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|