Skip to content

Commit 666920b

Browse files
committed
make eslint better slightly
1 parent c86e1bd commit 666920b

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

esbuild-configs/desktop.esbuild.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-undef */
21
// @ts-check
32
import { context } from 'esbuild';
43

esbuild-configs/web.esbuild.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-undef */
21
// @ts-check
32
import { context } from 'esbuild';
43
import { polyfillNode } from 'esbuild-plugin-polyfill-node';

eslint.config.mjs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export default tseslint.config(
4141
...tseslint.configs.recommended,
4242
...tseslint.configs.stylistic,
4343
{
44+
ignores: ['eslint.config.mjs'],
4445
plugins: {
4546
'@stylistic': stylistic,
4647
'unicorn': eslintPluginUnicorn,
@@ -77,14 +78,23 @@ export default tseslint.config(
7778
},
7879
],
7980
},
81+
languageOptions: {
82+
parserOptions: {
83+
tsconfigRootDir: import.meta.dirname,
84+
project: './tsconfig.json',
85+
},
86+
},
8087
},
8188
{
82-
files: ['esbuild.mjs'],
89+
files: ['esbuild.mjs', '**/*.esbuild.{m,c,}js'],
8390
languageOptions: {
8491
globals: {
8592
...globals.node,
8693
...globals.browser,
8794
},
95+
parserOptions: {
96+
project: null,
97+
},
8898
},
8999
},
90100
);

0 commit comments

Comments
 (0)