2024-07-10 16:44:39 +00:00
|
|
|
import blitzPlugin from '@blitz/eslint-plugin';
|
2024-07-24 15:43:32 +00:00
|
|
|
import { jsFileExtensions } from '@blitz/eslint-plugin/dist/configs/javascript.js';
|
|
|
|
import { getNamingConventionRule, tsFileExtensions } from '@blitz/eslint-plugin/dist/configs/typescript.js';
|
2024-07-10 16:44:39 +00:00
|
|
|
|
|
|
|
export default [
|
|
|
|
{
|
2024-07-24 15:43:32 +00:00
|
|
|
ignores: ['**/dist', '**/node_modules', '**/.wrangler', '**/bolt/build'],
|
2024-07-10 16:44:39 +00:00
|
|
|
},
|
|
|
|
...blitzPlugin.configs.recommended(),
|
|
|
|
{
|
|
|
|
rules: {
|
|
|
|
'@blitz/catch-error-name': 'off',
|
2024-07-17 18:54:46 +00:00
|
|
|
'@typescript-eslint/no-this-alias': 'off',
|
|
|
|
'@typescript-eslint/no-empty-object-type': 'off',
|
2024-07-10 16:44:39 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ['**/*.tsx'],
|
|
|
|
rules: {
|
|
|
|
...getNamingConventionRule({}, true),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ['**/*.d.ts'],
|
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/no-empty-object-type': 'off',
|
|
|
|
},
|
|
|
|
},
|
2024-07-24 15:43:32 +00:00
|
|
|
{
|
|
|
|
files: [...tsFileExtensions, ...jsFileExtensions, '**/*.tsx'],
|
2024-09-25 18:54:09 +00:00
|
|
|
ignores: ['functions/*'],
|
2024-07-24 15:43:32 +00:00
|
|
|
rules: {
|
|
|
|
'no-restricted-imports': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
patterns: [
|
|
|
|
{
|
|
|
|
group: ['../'],
|
|
|
|
message: `Relative imports are not allowed. Please use '~/' instead.`,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2024-07-10 16:44:39 +00:00
|
|
|
];
|