@ofk/eslint-config 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # @ofk/eslint-config
2
+
3
+ @ofk/eslint-config is an eslint config that enables more rules than recommended.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install --save-dev @ofk/eslint-config
9
+ npx install-peerdeps --dev @ofk/eslint-config
10
+ ```
11
+
12
+ ## Setup
13
+
14
+ ```js
15
+ // eslint.config.js
16
+ import config from '@ofk/eslint-config';
17
+
18
+ export default config();
19
+ ```
20
+
21
+ Customization is possible.
22
+
23
+ ```js
24
+ import config from '@ofk/eslint-config';
25
+ import configPrettier from 'eslint-config-prettier';
26
+
27
+ export default config({
28
+ extends: [configPrettier],
29
+ ignores: ['dist/'],
30
+ imports: {
31
+ defaultExportFiles: ['src/routes/**'],
32
+ },
33
+ rules: {
34
+ '@typescript-eslint/explicit-function-return-type': 'off',
35
+ },
36
+ settings: {
37
+ 'import/resolver': {
38
+ typescript: {},
39
+ },
40
+ },
41
+ ts: {
42
+ strict: false,
43
+ },
44
+ });
45
+ ```
@@ -0,0 +1,52 @@
1
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
2
+ import { ConfigWithExtends } from 'typescript-eslint';
3
+ import { Linter } from 'eslint';
4
+
5
+ declare function imports({ defaultExportFiles, node, typescript, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
6
+ defaultExportFiles?: false | string[];
7
+ node?: boolean;
8
+ typescript?: boolean;
9
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
10
+
11
+ declare function jsGlobals({ browser, es2024, node, }: {
12
+ browser?: boolean;
13
+ es2024?: boolean;
14
+ node?: boolean;
15
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
16
+ declare function js({ globals, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
17
+ globals?: false | Parameters<typeof jsGlobals>[0];
18
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
19
+
20
+ declare function react(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
21
+
22
+ declare function ts({ disableTypeChecked, parserOptions, strict, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
23
+ disableTypeChecked?: boolean;
24
+ parserOptions?: false | Linter.ParserOptions;
25
+ strict?: boolean;
26
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
27
+
28
+ declare function vitest(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
29
+
30
+ declare function defineBaseConfig({ eslintComments: eslintCommentsOptions, ignores, imports: importsOptions, js: jsOptions, perfectionist: perfectionistOptions, settings, ts: tsOptions, unicorn: unicornOptions, unusedImports: unusedImportsOptions, vitest: vitestOptions, ...config }?: Pick<ConfigWithExtends, 'extends' | 'ignores' | 'rules' | 'settings'> & {
31
+ eslintComments?: false | {};
32
+ imports?: false | Parameters<typeof imports>[0];
33
+ js?: false | Parameters<typeof js>[0];
34
+ perfectionist?: false | {};
35
+ ts?: false | Parameters<typeof ts>[0];
36
+ unicorn?: false | {};
37
+ unusedImports?: false | {};
38
+ vitest?: false | Parameters<typeof vitest>[0];
39
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
40
+
41
+ declare function defineReactConfig({ jsxA11y: enabledJsxA11y, jsxRuntime: enabledJsxRuntime, reactHooks: enabledReactHooks, reactRefresh: enabledReactRefresh, ...reactOptions }?: Parameters<typeof react>[0] & {
42
+ jsxA11y?: boolean;
43
+ jsxRuntime?: boolean;
44
+ reactHooks?: boolean;
45
+ reactRefresh?: boolean;
46
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
47
+
48
+ declare function defineConfig({ eslintComments: eslintCommentsOptions, imports: importsOptions, js: jsOptions, perfectionist: perfectionistOptions, react: reactOptions, ts: tsOptions, unusedImports: unusedImportsOptions, vitest: vitestOptions, ...config }?: Parameters<typeof defineBaseConfig>[0] & {
49
+ react?: false | Parameters<typeof defineReactConfig>[0];
50
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
51
+
52
+ export { defineConfig as default };
@@ -0,0 +1,52 @@
1
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
2
+ import { ConfigWithExtends } from 'typescript-eslint';
3
+ import { Linter } from 'eslint';
4
+
5
+ declare function imports({ defaultExportFiles, node, typescript, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
6
+ defaultExportFiles?: false | string[];
7
+ node?: boolean;
8
+ typescript?: boolean;
9
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
10
+
11
+ declare function jsGlobals({ browser, es2024, node, }: {
12
+ browser?: boolean;
13
+ es2024?: boolean;
14
+ node?: boolean;
15
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
16
+ declare function js({ globals, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
17
+ globals?: false | Parameters<typeof jsGlobals>[0];
18
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
19
+
20
+ declare function react(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
21
+
22
+ declare function ts({ disableTypeChecked, parserOptions, strict, ...config }: Pick<ConfigWithExtends, 'extends' | 'rules'> & {
23
+ disableTypeChecked?: boolean;
24
+ parserOptions?: false | Linter.ParserOptions;
25
+ strict?: boolean;
26
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
27
+
28
+ declare function vitest(config: Pick<ConfigWithExtends, 'extends' | 'rules'>): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
29
+
30
+ declare function defineBaseConfig({ eslintComments: eslintCommentsOptions, ignores, imports: importsOptions, js: jsOptions, perfectionist: perfectionistOptions, settings, ts: tsOptions, unicorn: unicornOptions, unusedImports: unusedImportsOptions, vitest: vitestOptions, ...config }?: Pick<ConfigWithExtends, 'extends' | 'ignores' | 'rules' | 'settings'> & {
31
+ eslintComments?: false | {};
32
+ imports?: false | Parameters<typeof imports>[0];
33
+ js?: false | Parameters<typeof js>[0];
34
+ perfectionist?: false | {};
35
+ ts?: false | Parameters<typeof ts>[0];
36
+ unicorn?: false | {};
37
+ unusedImports?: false | {};
38
+ vitest?: false | Parameters<typeof vitest>[0];
39
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
40
+
41
+ declare function defineReactConfig({ jsxA11y: enabledJsxA11y, jsxRuntime: enabledJsxRuntime, reactHooks: enabledReactHooks, reactRefresh: enabledReactRefresh, ...reactOptions }?: Parameters<typeof react>[0] & {
42
+ jsxA11y?: boolean;
43
+ jsxRuntime?: boolean;
44
+ reactHooks?: boolean;
45
+ reactRefresh?: boolean;
46
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
47
+
48
+ declare function defineConfig({ eslintComments: eslintCommentsOptions, imports: importsOptions, js: jsOptions, perfectionist: perfectionistOptions, react: reactOptions, ts: tsOptions, unusedImports: unusedImportsOptions, vitest: vitestOptions, ...config }?: Parameters<typeof defineBaseConfig>[0] & {
49
+ react?: false | Parameters<typeof defineReactConfig>[0];
50
+ }): _typescript_eslint_utils_ts_eslint.FlatConfig.ConfigArray;
51
+
52
+ export { defineConfig as default };