bolt.new-any-llm/eslint.config.mjs

64 lines
1.7 KiB
JavaScript
Raw Permalink Normal View History

2024-07-10 16:44:39 +00:00
import blitzPlugin from '@blitz/eslint-plugin';
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-12-01 23:42:44 +00:00
ignores: [
'**/dist',
'**/node_modules',
'**/.wrangler',
'**/bolt/build',
'**/.history',
],
2024-07-10 16:44:39 +00:00
},
...blitzPlugin.configs.recommended(),
{
rules: {
'@blitz/catch-error-name': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@blitz/comment-syntax': 'off',
'@blitz/block-scope-case': 'off',
2024-12-02 11:06:17 +00:00
'array-bracket-spacing': ["error", "never"],
'object-curly-newline': ["error", { "consistent": true }],
'keyword-spacing': ["error", { "before": true, "after": true }],
'consistent-return': "error",
'semi': ["error", "always"],
2024-12-02 11:21:32 +00:00
'curly': ["error"],
'no-eval': ["error"],
'linebreak-style': ["error", "unix"],
2024-12-02 11:06:17 +00:00
'arrow-spacing': ["error", { "before": true, "after": true }]
2024-07-10 16:44:39 +00:00
},
},
{
files: ['**/*.tsx'],
rules: {
...getNamingConventionRule({}, true),
},
},
{
files: ['**/*.d.ts'],
rules: {
'@typescript-eslint/no-empty-object-type': 'off',
},
},
{
files: [...tsFileExtensions, ...jsFileExtensions, '**/*.tsx'],
2024-09-25 18:54:09 +00:00
ignores: ['functions/*'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['../'],
2024-12-01 23:42:44 +00:00
message: 'Relative imports are not allowed. Please use \'~/\' instead.',
},
],
},
],
},
},
2024-07-10 16:44:39 +00:00
];