Vercel/eslint.config.mjs
Sam Becker c8ea51cdd1
Next.js 16 (#351)
* Upgrade to next.js 16

* Allow static generation on preview

* Add note for disabled ref rule

* Report Next.js version in App Insights

* Link Next.js version
2025-11-02 11:23:52 -06:00

61 lines
1.4 KiB
JavaScript

import { defineConfig, globalIgnores } from 'eslint/config';
import nextVitals from 'eslint-config-next/core-web-vitals';
import nextTs from 'eslint-config-next/typescript';
import stylistic from '@stylistic/eslint-plugin';
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
// Override default ignores of eslint-config-next.
globalIgnores([
// Default ignores of eslint-config-next:
'.next/**',
'out/**',
'build/**',
'next-env.d.ts',
]), {
plugins: {
'@stylistic': stylistic,
},
rules: {
// Disable rule during Next.js 16 migration
'react-hooks/refs': 'off',
'@next/next/no-img-element': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@stylistic/indent': ['warn', 2],
'no-unused-expressions': ['warn'],
'no-duplicate-imports': ['warn'],
'@typescript-eslint/no-unused-vars': [
'warn', {
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
},
],
'comma-dangle': [
'warn',
'always-multiline',
],
'linebreak-style': [
'warn',
'unix',
],
'quotes': [
'warn',
'single',
],
'semi': [
'warn',
'always',
],
'max-len': [
'warn',
{ 'code': 80 },
],
},
},
]);
export default eslintConfig;