@danielwaltz/eslint-config 0.0.13 → 0.1.0
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/CHANGELOG.md +34 -0
- package/README.md +24 -3
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +2 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v0.1.0
|
|
5
|
+
|
|
6
|
+
[compare changes](https://github.com/danielwaltz/eslint-config/compare/v0.0.14...v0.1.0)
|
|
7
|
+
|
|
8
|
+
### 🚀 Enhancements
|
|
9
|
+
|
|
10
|
+
- Add exports from eslint flat config utils ([44a7316](https://github.com/danielwaltz/eslint-config/commit/44a7316))
|
|
11
|
+
- ⚠️ Use latest version of `@sxzz/eslint-config` ([48bc7aa](https://github.com/danielwaltz/eslint-config/commit/48bc7aa))
|
|
12
|
+
|
|
13
|
+
#### ⚠️ Breaking Changes
|
|
14
|
+
|
|
15
|
+
- ⚠️ Use latest version of `@sxzz/eslint-config` ([48bc7aa](https://github.com/danielwaltz/eslint-config/commit/48bc7aa))
|
|
16
|
+
|
|
17
|
+
### ❤️ Contributors
|
|
18
|
+
|
|
19
|
+
- Daniel Waltz ([@danielwaltz](http://github.com/danielwaltz))
|
|
20
|
+
|
|
21
|
+
## v0.0.14
|
|
22
|
+
|
|
23
|
+
[compare changes](https://github.com/danielwaltz/eslint-config/compare/v0.0.13...v0.0.14)
|
|
24
|
+
|
|
25
|
+
### 🚀 Enhancements
|
|
26
|
+
|
|
27
|
+
- Use const type params for generics ([a9e8b05](https://github.com/danielwaltz/eslint-config/commit/a9e8b05))
|
|
28
|
+
|
|
29
|
+
### 🏡 Chore
|
|
30
|
+
|
|
31
|
+
- Update readme usage examples ([001ec31](https://github.com/danielwaltz/eslint-config/commit/001ec31))
|
|
32
|
+
- Add npm version badge to readme ([cac09a1](https://github.com/danielwaltz/eslint-config/commit/cac09a1))
|
|
33
|
+
|
|
34
|
+
### ❤️ Contributors
|
|
35
|
+
|
|
36
|
+
- Daniel Waltz ([@danielwaltz](http://github.com/danielwaltz))
|
|
37
|
+
|
|
4
38
|
## v0.0.13
|
|
5
39
|
|
|
6
40
|
[compare changes](https://github.com/danielwaltz/eslint-config/compare/v0.0.12...v0.0.13)
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @danielwaltz/eslint-config
|
|
1
|
+
# @danielwaltz/eslint-config [](https://npmjs.com/package/@danielwaltz/eslint-config)
|
|
2
2
|
|
|
3
3
|
My personal ESLint configuration. Extends from [@sxzz/eslint-config](https://github.com/sxzz/eslint-config).
|
|
4
4
|
|
|
@@ -10,7 +10,9 @@ npx -y nypm@latest i -D eslint prettier @danielwaltz/eslint-config
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Using a TypeScript `eslint.config.ts` config file is ideal.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
14
16
|
import { danielwaltz } from "@danielwaltz/eslint-config";
|
|
15
17
|
|
|
16
18
|
export default danielwaltz();
|
|
@@ -18,10 +20,29 @@ export default danielwaltz();
|
|
|
18
20
|
|
|
19
21
|
## Customization
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
Refer to [eslint-flat-config-utils](https://github.com/antfu/eslint-flat-config-utils) for all available options.
|
|
24
|
+
|
|
25
|
+
```ts
|
|
22
26
|
import { danielwaltz } from "@danielwaltz/eslint-config";
|
|
23
27
|
|
|
24
28
|
export default danielwaltz([...customConfigs])
|
|
25
29
|
.prepend([...prependConfigs])
|
|
26
30
|
.append([...appendConfigs]);
|
|
27
31
|
```
|
|
32
|
+
|
|
33
|
+
## Nuxt
|
|
34
|
+
|
|
35
|
+
Install the official [Nuxt ESLint](https://eslint.nuxt.com/) module.
|
|
36
|
+
|
|
37
|
+
```shell
|
|
38
|
+
npx nuxi module add eslint
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Update the generated config.
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import { danielwaltz } from "@danielwaltz/eslint-config";
|
|
45
|
+
import { withNuxt } from "./.nuxt/eslint.config.mjs";
|
|
46
|
+
|
|
47
|
+
export default withNuxt(danielwaltz());
|
|
48
|
+
```
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
|
|
2
2
|
import { DefaultConfigNamesMap, ResolvableFlatConfig } from 'eslint-flat-config-utils';
|
|
3
|
+
export { DefaultConfigNamesMap, defineFlatConfig } from 'eslint-flat-config-utils';
|
|
3
4
|
import * as eslint from 'eslint';
|
|
4
5
|
import { Linter } from 'eslint';
|
|
5
6
|
export * from '@sxzz/eslint-config';
|
|
6
7
|
|
|
7
|
-
type BaseConfig = Linter.Config
|
|
8
|
+
type BaseConfig = Linter.Config;
|
|
8
9
|
type BaseConfigNames = keyof DefaultConfigNamesMap;
|
|
9
10
|
|
|
10
|
-
declare function defineFlatConfigs<TConfig extends BaseConfig = BaseConfig, TConfigNames extends string = BaseConfigNames>(...configs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
|
|
11
|
+
declare function defineFlatConfigs<const TConfig extends BaseConfig = BaseConfig, const TConfigNames extends string = BaseConfigNames>(...configs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
|
|
11
12
|
|
|
12
|
-
declare function danielwaltz<TConfig extends BaseConfig = BaseConfig, TConfigNames extends string = BaseConfigNames>(...userConfigs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
|
|
13
|
+
declare function danielwaltz<const TConfig extends BaseConfig = BaseConfig, const TConfigNames extends string = BaseConfigNames>(...userConfigs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
|
|
13
14
|
|
|
14
15
|
export { danielwaltz, defineFlatConfigs };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
|
|
2
2
|
import { DefaultConfigNamesMap, ResolvableFlatConfig } from 'eslint-flat-config-utils';
|
|
3
|
+
export { DefaultConfigNamesMap, defineFlatConfig } from 'eslint-flat-config-utils';
|
|
3
4
|
import * as eslint from 'eslint';
|
|
4
5
|
import { Linter } from 'eslint';
|
|
5
6
|
export * from '@sxzz/eslint-config';
|
|
6
7
|
|
|
7
|
-
type BaseConfig = Linter.Config
|
|
8
|
+
type BaseConfig = Linter.Config;
|
|
8
9
|
type BaseConfigNames = keyof DefaultConfigNamesMap;
|
|
9
10
|
|
|
10
|
-
declare function defineFlatConfigs<TConfig extends BaseConfig = BaseConfig, TConfigNames extends string = BaseConfigNames>(...configs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
|
|
11
|
+
declare function defineFlatConfigs<const TConfig extends BaseConfig = BaseConfig, const TConfigNames extends string = BaseConfigNames>(...configs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
|
|
11
12
|
|
|
12
|
-
declare function danielwaltz<TConfig extends BaseConfig = BaseConfig, TConfigNames extends string = BaseConfigNames>(...userConfigs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
|
|
13
|
+
declare function danielwaltz<const TConfig extends BaseConfig = BaseConfig, const TConfigNames extends string = BaseConfigNames>(...userConfigs: ResolvableFlatConfig<TConfig>[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord> extends TConfig ? TConfig : eslint.Linter.Config<eslint.Linter.RulesRecord>, TConfigNames>;
|
|
13
14
|
|
|
14
15
|
export { danielwaltz, defineFlatConfigs };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { sxzz, hasVue } from '@sxzz/eslint-config';
|
|
2
2
|
export * from '@sxzz/eslint-config';
|
|
3
3
|
import { composer } from 'eslint-flat-config-utils';
|
|
4
|
+
export { defineFlatConfig } from 'eslint-flat-config-utils';
|
|
4
5
|
|
|
5
6
|
function unicornConfigs() {
|
|
6
7
|
return [
|
|
@@ -111,7 +112,7 @@ function danielwaltz(...userConfigs) {
|
|
|
111
112
|
const composer = defineFlatConfigs(...userConfigs);
|
|
112
113
|
composer.prepend(sxzz());
|
|
113
114
|
composer.append(unicornConfigs());
|
|
114
|
-
if (hasVue) composer.append(vueConfigs());
|
|
115
|
+
if (hasVue()) composer.append(vueConfigs());
|
|
115
116
|
return composer;
|
|
116
117
|
}
|
|
117
118
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielwaltz/eslint-config",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"packageManager": "pnpm@9.15.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"prettier": ">=3"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@sxzz/eslint-config": "^
|
|
42
|
-
"eslint-flat-config-utils": "^2.0.
|
|
41
|
+
"@sxzz/eslint-config": "^5.0.1",
|
|
42
|
+
"eslint-flat-config-utils": "^2.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@tsconfig/node22": "^22.0.0",
|