Skip to content

Commit c2b3e5a

Browse files
chore: migrate eslint to flat config
1 parent 1cfd49b commit c2b3e5a

File tree

5 files changed

+53
-37
lines changed

5 files changed

+53
-37
lines changed

.eslintrc.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

eslint.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { defineConfig } from 'eslint/config';
2+
import eslint from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
4+
5+
export default defineConfig(
6+
{
7+
name: 'linter options',
8+
linterOptions: {
9+
reportUnusedDisableDirectives: 'error',
10+
},
11+
},
12+
{
13+
name: 'TypeScript Source Files',
14+
extends: [eslint.configs.recommended, tseslint.configs.strictTypeChecked],
15+
files: ['src/**/*.ts'],
16+
languageOptions: {
17+
parserOptions: {
18+
projectService: true,
19+
},
20+
},
21+
},
22+
);

package-lock.json

Lines changed: 26 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@faker-js/cli",
33
"version": "0.0.0",
44
"description": "A CLI of @faker-js/faker.",
5+
"type": "module",
56
"bin": {
67
"@faker-js/cli": "bin/faker.js",
78
"faker": "bin/faker.js"
@@ -47,11 +48,10 @@
4748
"bugs": "https://github.com/faker-js/cli/issues",
4849
"license": "MIT",
4950
"devDependencies": {
50-
"@typescript-eslint/eslint-plugin": "8.50.1",
51-
"@typescript-eslint/parser": "8.50.1",
5251
"eslint": "9.39.2",
5352
"prettier": "3.7.4",
54-
"typescript": "5.9.3"
53+
"typescript": "5.9.3",
54+
"typescript-eslint": "8.50.1"
5555
},
5656
"dependencies": {
5757
"@faker-js/faker": "^8.4.1",

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export function cli(args: string[]) {
3636
throw new ReferenceError('function', functionName);
3737
}
3838

39+
// TODO: Need to figure out how to strictly type this function call
40+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
3941
console.log(entry());
4042
});
4143

0 commit comments

Comments
 (0)