- App Router under src/app/[locale] with locale 'it' as default - next-intl middleware and getRequestConfig with setRequestLocale - Tailwind CSS with shared font variable and content from packages/ui - ESLint via @ketopath/eslint-config/nextjs, tsconfig via @ketopath/tsconfig/nextjs - Inter font, base layout, home page with translated copy and disclaimer Tweaks to shared eslint-config: - Disable consistent-type-imports for .cjs files (next parser is not @typescript-eslint) - Configure import resolver to discover tsconfig in apps/* and packages/* - Drop *.config.* ignore patterns (overrides handle them with env.node) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
58 lines
1.5 KiB
JavaScript
58 lines
1.5 KiB
JavaScript
/** @type {import('eslint').Linter.Config} */
|
|
module.exports = {
|
|
root: false,
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
},
|
|
plugins: ['@typescript-eslint', 'import'],
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:import/recommended',
|
|
'plugin:import/typescript',
|
|
'prettier',
|
|
],
|
|
settings: {
|
|
'import/resolver': {
|
|
typescript: {
|
|
alwaysTryTypes: true,
|
|
project: ['tsconfig.json', 'apps/*/tsconfig.json', 'packages/*/tsconfig.json'],
|
|
},
|
|
node: true,
|
|
},
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
],
|
|
'@typescript-eslint/consistent-type-imports': [
|
|
'error',
|
|
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
|
|
],
|
|
'import/order': [
|
|
'error',
|
|
{
|
|
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
|
|
'newlines-between': 'always',
|
|
alphabetize: { order: 'asc', caseInsensitive: true },
|
|
},
|
|
],
|
|
'import/no-default-export': 'off',
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['*.cjs', '*.config.js', '*.config.mjs'],
|
|
env: { node: true },
|
|
rules: {
|
|
'@typescript-eslint/no-var-requires': 'off',
|
|
'@typescript-eslint/consistent-type-imports': 'off',
|
|
},
|
|
},
|
|
],
|
|
ignorePatterns: ['node_modules/', 'dist/', 'build/', '.next/', 'out/', 'coverage/'],
|
|
};
|