Skip to content

Commit

Permalink
chore: migrate to typescript-eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
wadackel committed Feb 25, 2024
1 parent f16e70a commit 305f29d
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 105 deletions.
14 changes: 4 additions & 10 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
import globals from 'globals';
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import typescriptParser from '@typescript-eslint/parser';
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
import tseslint from 'typescript-eslint';
import importPlugin from 'eslint-plugin-import';
import prettierConfig from 'eslint-config-prettier';

const compat = new FlatCompat();

export default [
export default tseslint.config(
{
ignores: ['**/dist/', '**/storybook-static/'],
},
{
plugins: {
'@typescript-eslint': typescriptPlugin,
import: importPlugin,
},
languageOptions: {
parser: typescriptParser,
globals: {
...globals.node,
...globals.browser,
},
},
},
js.configs.recommended,
...compat.extends('plugin:@typescript-eslint/eslint-recommended'),
...tseslint.configs.recommended,
{
files: ['**/*.ts'],
rules: {
Expand All @@ -44,4 +38,4 @@ export default [
},
},
prettierConfig,
];
);
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@
"devDependencies": {
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.1",
"@eslint/eslintrc": "3.0.1",
"@eslint/js": "8.56.0",
"@storybook/test-runner": "0.16.0",
"@tsconfig/node20": "20.1.2",
"@tsconfig/strictest": "2.0.3",
"@types/node": "20.11.20",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"concurrently": "8.2.2",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
Expand All @@ -48,6 +45,7 @@
"rimraf": "5.0.5",
"tsup": "8.0.2",
"typescript": "5.3.3",
"typescript-eslint": "7.0.2",
"wait-on": "7.2.0",
"zx": "7.2.3"
},
Expand Down
1 change: 1 addition & 0 deletions packages/storycap-testrun/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/ban-types
export type Simplify<T> = { [K in keyof T]: T[K] } & {};

export type RequiredDeep<T> = Simplify<
Expand Down
Loading

0 comments on commit 305f29d

Please sign in to comment.