Skip to content

Commit f63dccd

Browse files
committed
Use neostandard instead of eslint-config-standard
1 parent 871d750 commit f63dccd

16 files changed

+195
-628
lines changed

Diff for: .eslintignore

-6
This file was deleted.

Diff for: .eslintrc

-36
This file was deleted.

Diff for: eslint.config.mjs

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
2+
import globals from 'globals';
3+
import tsParser from '@typescript-eslint/parser';
4+
import path from 'node:path';
5+
import { fileURLToPath } from 'node:url';
6+
import js from '@eslint/js';
7+
import { FlatCompat } from '@eslint/eslintrc';
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all,
15+
});
16+
17+
export default [
18+
{
19+
ignores: [
20+
'**/jest.config.js',
21+
'**/dist/',
22+
'**/example/',
23+
'**/node_modules/',
24+
'**/.snapshots/',
25+
'**/*.min.js',
26+
],
27+
},
28+
...compat.extends(
29+
'plugin:prettier/recommended',
30+
'plugin:@typescript-eslint/recommended',
31+
'plugin:react/recommended',
32+
),
33+
{
34+
plugins: {
35+
'@typescript-eslint': typescriptEslint,
36+
},
37+
38+
languageOptions: {
39+
globals: {
40+
...globals.node,
41+
},
42+
43+
parser: tsParser,
44+
ecmaVersion: 2020,
45+
sourceType: 'commonjs',
46+
47+
parserOptions: {
48+
ecmaFeatures: {
49+
legacyDecorators: true,
50+
jsx: true,
51+
},
52+
},
53+
},
54+
55+
settings: {
56+
react: {
57+
version: '18',
58+
},
59+
},
60+
61+
rules: {
62+
'space-before-function-paren': 0,
63+
'react/prop-types': 0,
64+
'react/jsx-handler-names': 0,
65+
'react/jsx-fragments': 0,
66+
'react/no-unused-prop-types': 0,
67+
'import/export': 0,
68+
'@typescript-eslint/no-empty-function': 0,
69+
'@typescript-eslint/no-explicit-any': 0,
70+
'@typescript-eslint/no-non-null-assertion': 0,
71+
},
72+
},
73+
];

Diff for: example/.eslintignore

-1
This file was deleted.

Diff for: example/.eslintrc

-3
This file was deleted.

Diff for: example/eslint.config.mjs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import path from "node:path";
2+
import { fileURLToPath } from "node:url";
3+
import js from "@eslint/js";
4+
import { FlatCompat } from "@eslint/eslintrc";
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
recommendedConfig: js.configs.recommended,
11+
allConfig: js.configs.all
12+
});
13+
14+
export default [{
15+
ignores: ["**/build"],
16+
}, ...compat.extends("plugin:@next/next/recommended")];

Diff for: example/next-env.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

0 commit comments

Comments
 (0)