-
Notifications
You must be signed in to change notification settings - Fork 63
/
eslint.config.mjs
50 lines (46 loc) · 1.22 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import blitzPlugin from '@blitz/eslint-plugin';
import { getNamingConventionRule, tsFileExtensions } from '@blitz/eslint-plugin/dist/configs/typescript.js';
import eslintPluginAstro from 'eslint-plugin-astro';
export default [
{
ignores: [
'**/dist',
'**/node_modules',
'**/.astro/**',
'**/.vscode-test/**',
// we ignore our demo templates because they may contain code that is formatted specifically for the demo
'docs/demo/src/templates',
],
},
...blitzPlugin.configs.recommended({
ts: {
namingConvention: {
variable: {
exceptions: ['Content', '__ENTERPRISE__', '__WC_CONFIG__', 'WebContainer'],
},
},
},
}),
...eslintPluginAstro.configs.recommended,
{
files: ['**/env.d.ts', '**/env-default.d.ts'],
rules: {
'@typescript-eslint/triple-slash-reference': 'off',
'multiline-comment-style': 'off',
},
},
{
files: tsFileExtensions,
rules: {
// we turn this off in favor of TypeScripts's `noImplicitReturns`
'consistent-return': 'off',
'@typescript-eslint/no-this-alias': 'off',
},
},
{
files: ['**/*.tsx'],
rules: {
...getNamingConventionRule({}, true),
},
},
];