Skip to content

Commit 0305b63

Browse files
authored
fix: improve linting and update eslint (#3128)
1 parent 1a058e6 commit 0305b63

71 files changed

Lines changed: 774 additions & 594 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
/packages/test-runner-mocha/*.d.ts
55
/packages/config-loader/
66
/packages/*/test/**/fixtures
7-
/packages/*/test/**/snapshots
7+
/packages/*/test/**/__snapshots__
88
/packages/dev-server-rollup/test/browser/**/*
99
/integration/test-runner/tests/*/browser-tests
1010
/packages/dev-server-hmr/scripts/**/*
1111
/packages/test-runner/demo/
12+
/packages/storybook-framework-web-components/tests/fixtures/all-in-one/storybook-build/
1213
/node_modules/
1314
/packages/*/node_modules/
1415
dist

docs/_data/site.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable */
2-
31
module.exports = async function () {
42
return {
53
name: 'Modern Web',

eslint.config.mjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import js from '@eslint/js';
2+
import eslintConfigPrettier from 'eslint-config-prettier';
3+
import { defineConfig, includeIgnoreFile } from 'eslint/config';
4+
import globals from 'globals';
5+
import { fileURLToPath } from 'node:url';
6+
import tseslint from 'typescript-eslint';
7+
8+
const eslintignorePath = fileURLToPath(new URL('.eslintignore', import.meta.url));
9+
10+
export default defineConfig([
11+
includeIgnoreFile(eslintignorePath),
12+
js.configs.recommended,
13+
...tseslint.configs.recommended,
14+
eslintConfigPrettier,
15+
{
16+
languageOptions: {
17+
globals: {
18+
...globals.browser,
19+
...globals.node,
20+
...globals.mocha,
21+
},
22+
},
23+
rules: {
24+
'@typescript-eslint/ban-ts-comment': 'off',
25+
'@typescript-eslint/no-explicit-any': 'off',
26+
'@typescript-eslint/no-require-imports': 'off',
27+
},
28+
},
29+
]);

0 commit comments

Comments
 (0)