@danielwaltz/eslint-config 0.0.5 → 0.0.7

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 CHANGED
@@ -1,6 +1,44 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## v0.0.7
5
+
6
+ [compare changes](https://github.com/danielwaltz/eslint-config/compare/v0.0.6...v0.0.7)
7
+
8
+ ### 🚀 Enhancements
9
+
10
+ - Support camel case file names ([ea01564](https://github.com/danielwaltz/eslint-config/commit/ea01564))
11
+
12
+ ### 📖 Documentation
13
+
14
+ - Include info about sxzz config ([8025acd](https://github.com/danielwaltz/eslint-config/commit/8025acd))
15
+
16
+ ### ❤️ Contributors
17
+
18
+ - Daniel Waltz ([@danielwaltz](http://github.com/danielwaltz))
19
+
20
+ ## v0.0.6
21
+
22
+ [compare changes](https://github.com/danielwaltz/eslint-config/compare/v0.0.5...v0.0.6)
23
+
24
+ ### 🚀 Enhancements
25
+
26
+ - Extend from sxzz eslint config ([2192f1e](https://github.com/danielwaltz/eslint-config/commit/2192f1e))
27
+
28
+ ### 📖 Documentation
29
+
30
+ - Add eslint and prettier to installation command ([8b42bf0](https://github.com/danielwaltz/eslint-config/commit/8b42bf0))
31
+
32
+ ### 🏡 Chore
33
+
34
+ - Add editorconfig ([2503c53](https://github.com/danielwaltz/eslint-config/commit/2503c53))
35
+ - Use package name import for project eslint config ([6756f9f](https://github.com/danielwaltz/eslint-config/commit/6756f9f))
36
+ - Update type assertions ([93159bc](https://github.com/danielwaltz/eslint-config/commit/93159bc))
37
+
38
+ ### ❤️ Contributors
39
+
40
+ - Daniel Waltz ([@danielwaltz](http://github.com/danielwaltz))
41
+
4
42
  ## v0.0.5
5
43
 
6
44
  [compare changes](https://github.com/danielwaltz/eslint-config/compare/v0.0.4...v0.0.5)
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # @danielwaltz/eslint-config
2
2
 
3
- My personal ESLint configuration.
3
+ My personal ESLint configuration. Extends from [@sxzz/eslint-config](https://github.com/sxzz/eslint-config).
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```shell
8
- npx -y nypm@latest i -D @danielwaltz/eslint-config
8
+ npx -y nypm@latest i -D eslint @danielwaltz/eslint-config
9
9
  ```
10
10
 
11
11
  ## Usage
package/dist/index.d.mts CHANGED
@@ -1,55 +1,10 @@
1
1
  import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
2
2
  import { ResolvableFlatConfig, FlatConfigComposer } from 'eslint-flat-config-utils';
3
3
  import * as eslint from 'eslint';
4
- import { Linter } from 'eslint';
5
-
6
- declare function formattingConfigs(): [eslint.Linter.FlatConfig, {
7
- readonly rules: {
8
- readonly "prettier/prettier": "warn";
9
- };
10
- readonly name: "danielwaltz/formatting/customized";
11
- }];
12
-
13
- declare function globalConfigs(): [{
14
- readonly ignores: ["**/.next/**", "**/.nuxt/**", "**/build/**", "**/coverage/**", "**/dist/**", "**/generated/**", "**/node_modules/**", "**/out/**"];
15
- readonly name: "danielwaltz/global/ignores";
16
- }];
17
-
18
- declare function importConfigs(): [Linter.Config<Linter.RulesRecord>, {
19
- settings: {
20
- "import-x/extensions": readonly [".ts", ".tsx", ".cts", ".mts", ".js", ".jsx", ".cjs", ".mjs"];
21
- "import-x/external-module-folders": string[];
22
- "import-x/parsers": {
23
- "@typescript-eslint/parser": (".ts" | ".tsx" | ".cts" | ".mts")[];
24
- };
25
- "import-x/resolver": {
26
- typescript: true;
27
- };
28
- };
29
- rules: {
30
- "import-x/named": "off";
31
- };
32
- }, {
33
- readonly files: ["**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,d.ts,vue}"];
34
- readonly rules: {
35
- readonly "import-x/no-unresolved": ["error", {
36
- readonly ignore: readonly ["\\?*$"];
37
- }];
38
- readonly "import-x/order": ["warn", {
39
- readonly groups: readonly ["builtin", "external", "internal", "parent", "sibling", "index"];
40
- readonly alphabetize: {
41
- readonly order: "asc";
42
- readonly caseInsensitive: false;
43
- };
44
- }];
45
- };
46
- readonly name: "danielwaltz/import/customized";
47
- }];
48
-
49
- declare function typescriptConfigs(): ResolvableFlatConfig;
4
+ export * from '@sxzz/eslint-config';
50
5
 
51
6
  declare function defineFlatConfigs(...configs: ResolvableFlatConfig[]): FlatConfigComposer;
52
7
 
53
8
  declare function danielwaltz(...userConfigs: ResolvableFlatConfig[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord>, never>;
54
9
 
55
- export { danielwaltz, defineFlatConfigs, formattingConfigs, globalConfigs, importConfigs, typescriptConfigs };
10
+ export { danielwaltz, defineFlatConfigs };
package/dist/index.d.ts CHANGED
@@ -1,55 +1,10 @@
1
1
  import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
2
2
  import { ResolvableFlatConfig, FlatConfigComposer } from 'eslint-flat-config-utils';
3
3
  import * as eslint from 'eslint';
4
- import { Linter } from 'eslint';
5
-
6
- declare function formattingConfigs(): [eslint.Linter.FlatConfig, {
7
- readonly rules: {
8
- readonly "prettier/prettier": "warn";
9
- };
10
- readonly name: "danielwaltz/formatting/customized";
11
- }];
12
-
13
- declare function globalConfigs(): [{
14
- readonly ignores: ["**/.next/**", "**/.nuxt/**", "**/build/**", "**/coverage/**", "**/dist/**", "**/generated/**", "**/node_modules/**", "**/out/**"];
15
- readonly name: "danielwaltz/global/ignores";
16
- }];
17
-
18
- declare function importConfigs(): [Linter.Config<Linter.RulesRecord>, {
19
- settings: {
20
- "import-x/extensions": readonly [".ts", ".tsx", ".cts", ".mts", ".js", ".jsx", ".cjs", ".mjs"];
21
- "import-x/external-module-folders": string[];
22
- "import-x/parsers": {
23
- "@typescript-eslint/parser": (".ts" | ".tsx" | ".cts" | ".mts")[];
24
- };
25
- "import-x/resolver": {
26
- typescript: true;
27
- };
28
- };
29
- rules: {
30
- "import-x/named": "off";
31
- };
32
- }, {
33
- readonly files: ["**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,d.ts,vue}"];
34
- readonly rules: {
35
- readonly "import-x/no-unresolved": ["error", {
36
- readonly ignore: readonly ["\\?*$"];
37
- }];
38
- readonly "import-x/order": ["warn", {
39
- readonly groups: readonly ["builtin", "external", "internal", "parent", "sibling", "index"];
40
- readonly alphabetize: {
41
- readonly order: "asc";
42
- readonly caseInsensitive: false;
43
- };
44
- }];
45
- };
46
- readonly name: "danielwaltz/import/customized";
47
- }];
48
-
49
- declare function typescriptConfigs(): ResolvableFlatConfig;
4
+ export * from '@sxzz/eslint-config';
50
5
 
51
6
  declare function defineFlatConfigs(...configs: ResolvableFlatConfig[]): FlatConfigComposer;
52
7
 
53
8
  declare function danielwaltz(...userConfigs: ResolvableFlatConfig[]): eslint_flat_config_utils.FlatConfigComposer<eslint.Linter.Config<eslint.Linter.RulesRecord>, never>;
54
9
 
55
- export { danielwaltz, defineFlatConfigs, formattingConfigs, globalConfigs, importConfigs, typescriptConfigs };
10
+ export { danielwaltz, defineFlatConfigs };
package/dist/index.mjs CHANGED
@@ -1,96 +1,106 @@
1
- import prettier from 'eslint-plugin-prettier/recommended';
2
- import importX from 'eslint-plugin-import-x';
3
- import eslint from '@eslint/js';
4
- import tseslint from 'typescript-eslint';
1
+ import { sxzz, hasVue } from '@sxzz/eslint-config';
2
+ export * from '@sxzz/eslint-config';
5
3
  import { composer } from 'eslint-flat-config-utils';
6
4
 
7
- function formattingConfigs() {
5
+ function unicornConfigs() {
8
6
  return [
9
- prettier,
10
7
  {
11
- rules: { "prettier/prettier": "warn" },
12
- name: "danielwaltz/formatting/customized"
13
- }
14
- ];
15
- }
16
-
17
- function globalConfigs() {
18
- return [
19
- {
20
- ignores: [
21
- "**/.next/**",
22
- "**/.nuxt/**",
23
- "**/build/**",
24
- "**/coverage/**",
25
- "**/dist/**",
26
- "**/generated/**",
27
- "**/node_modules/**",
28
- "**/out/**"
29
- ],
30
- name: "danielwaltz/global/ignores"
31
- }
32
- ];
33
- }
34
-
35
- function importConfigs() {
36
- return [
37
- importX.flatConfigs.recommended,
38
- importX.flatConfigs.typescript,
39
- {
40
- files: ["**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,d.ts,vue}"],
8
+ name: "danielwaltz/unicorn",
41
9
  rules: {
42
- "import-x/no-unresolved": ["error", { ignore: ["\\?*$"] }],
43
- "import-x/order": [
44
- "warn",
10
+ "unicorn/filename-case": [
11
+ "error",
45
12
  {
46
- groups: [
47
- "builtin",
48
- "external",
49
- "internal",
50
- "parent",
51
- "sibling",
52
- "index"
53
- ],
54
- alphabetize: { order: "asc", caseInsensitive: false }
13
+ cases: { camelCase: true, kebabCase: true, pascalCase: true },
14
+ ignore: [/^[A-Z]+\..*$/, /import_map\.json/]
55
15
  }
56
16
  ]
57
- },
58
- name: "danielwaltz/import/customized"
17
+ }
59
18
  }
60
19
  ];
61
20
  }
62
21
 
63
- function typescriptConfigs() {
64
- return tseslint.config(
65
- eslint.configs.recommended,
66
- tseslint.configs.recommendedTypeChecked,
67
- tseslint.configs.strictTypeChecked,
68
- {
69
- languageOptions: {
70
- parserOptions: {
71
- projectService: true,
72
- tsconfigRootDir: import.meta.dirname
73
- }
74
- },
75
- name: "danielwaltz/typescript/language-options"
76
- },
77
- {
78
- files: ["**/*.{js,mjs,cjs,jsx}"],
79
- extends: [tseslint.configs.disableTypeChecked],
80
- name: "danielwaltz/typescript/disable-in-javascript"
81
- },
22
+ function vueConfigs() {
23
+ return [
82
24
  {
83
- files: ["**/*.{ts,mts,cts,tsx,d.ts,vue,svelte,astro}"],
25
+ name: "danielwaltz/vue",
26
+ files: ["**/*.vue"],
84
27
  rules: {
85
- "@typescript-eslint/consistent-type-imports": [
28
+ "vue/block-lang": ["error", { script: { lang: ["ts", "tsx"] } }],
29
+ "vue/block-order": [
86
30
  "error",
87
- { fixStyle: "inline-type-imports" }
31
+ { order: ["script", "template", "style"] }
88
32
  ],
89
- "@typescript-eslint/no-import-type-side-effects": "error"
90
- },
91
- name: "danielwaltz/typescript/customized"
33
+ "vue/block-tag-newline": "error",
34
+ "vue/component-api-style": ["error", ["script-setup"]],
35
+ "vue/component-name-in-template-casing": "error",
36
+ "vue/component-options-name-casing": "error",
37
+ "vue/custom-event-name-casing": "error",
38
+ "vue/define-emits-declaration": ["error", "type-based"],
39
+ "vue/define-macros-order": [
40
+ "error",
41
+ {
42
+ order: [
43
+ "definePageMeta",
44
+ "defineOptions",
45
+ "defineModal",
46
+ "defineProps",
47
+ "defineEmits",
48
+ "defineSlots"
49
+ ],
50
+ defineExposeLast: true
51
+ }
52
+ ],
53
+ "vue/define-props-declaration": ["error", "type-based"],
54
+ "vue/enforce-style-attribute": ["error", { allow: ["scoped"] }],
55
+ "vue/html-button-has-type": "error",
56
+ "vue/html-comment-content-newline": "error",
57
+ "vue/html-comment-content-spacing": "error",
58
+ "vue/html-comment-indent": "error",
59
+ "vue/match-component-file-name": [
60
+ "error",
61
+ { extensions: ["vue", "tsx"] }
62
+ ],
63
+ "vue/match-component-import-name": "error",
64
+ "vue/next-tick-style": ["error", "promise"],
65
+ "vue/no-boolean-default": "error",
66
+ "vue/no-duplicate-attr-inheritance": "error",
67
+ "vue/no-empty-component-block": "error",
68
+ "vue/no-multiple-objects-in-class": "error",
69
+ "vue/no-ref-object-reactivity-loss": "error",
70
+ "vue/no-required-prop-with-default": ["error", { autofix: true }],
71
+ "vue/no-reserved-component-names": "error",
72
+ "vue/no-root-v-if": "error",
73
+ "vue/no-template-target-blank": "error",
74
+ "vue/no-unsupported-features": ["error", { version: "^3.5.0" }],
75
+ "vue/no-unused-emit-declarations": "error",
76
+ "vue/no-unused-properties": "error",
77
+ "vue/no-unused-refs": "error",
78
+ "vue/no-use-v-else-with-v-for": "error",
79
+ "vue/no-useless-mustaches": "error",
80
+ "vue/no-useless-v-bind": "error",
81
+ "vue/no-v-text": "error",
82
+ "vue/padding-line-between-blocks": "error",
83
+ "vue/prefer-define-options": "error",
84
+ "vue/prefer-prop-type-boolean-first": "error",
85
+ "vue/prefer-separate-static-class": "error",
86
+ "vue/prefer-true-attribute-shorthand": "error",
87
+ "vue/prefer-use-template-ref": "error",
88
+ "vue/require-direct-export": "error",
89
+ "vue/require-macro-variable-name": "error",
90
+ "vue/require-name-property": "error",
91
+ "vue/require-typed-ref": "error",
92
+ "vue/slot-name-casing": "error",
93
+ "vue/v-bind-style": [
94
+ "error",
95
+ "shorthand",
96
+ { sameNameShorthand: "always" }
97
+ ],
98
+ "vue/v-for-delimiter-style": "error",
99
+ "vue/v-on-function-call": "error",
100
+ "vue/valid-define-options": "error"
101
+ }
92
102
  }
93
- );
103
+ ];
94
104
  }
95
105
 
96
106
  function defineFlatConfigs(...configs) {
@@ -99,11 +109,11 @@ function defineFlatConfigs(...configs) {
99
109
 
100
110
  function danielwaltz(...userConfigs) {
101
111
  const composer = defineFlatConfigs(...userConfigs);
102
- composer.prepend(globalConfigs());
103
- composer.append(typescriptConfigs());
104
- composer.append(importConfigs());
105
- composer.append(formattingConfigs());
112
+ composer.append(sxzz());
113
+ composer.append(unicornConfigs());
114
+ if (hasVue)
115
+ composer.append(vueConfigs());
106
116
  return composer;
107
117
  }
108
118
 
109
- export { danielwaltz, defineFlatConfigs, formattingConfigs, globalConfigs, importConfigs, typescriptConfigs };
119
+ export { danielwaltz, defineFlatConfigs };
package/package.json CHANGED
@@ -1,16 +1,22 @@
1
1
  {
2
2
  "name": "@danielwaltz/eslint-config",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
+ "packageManager": "pnpm@9.15.0",
5
+ "type": "module",
6
+ "keywords": [
7
+ "eslint-config"
8
+ ],
4
9
  "license": "MIT",
5
- "author": "Daniel Waltz",
6
10
  "repository": {
7
11
  "type": "git",
8
12
  "url": "git+https://github.com/danielwaltz/eslint-config.git"
9
13
  },
10
- "keywords": [
11
- "eslint-config"
14
+ "author": "Daniel Waltz",
15
+ "files": [
16
+ "CHANGELOG.md",
17
+ "README.md",
18
+ "dist"
12
19
  ],
13
- "type": "module",
14
20
  "module": "./dist/index.mjs",
15
21
  "exports": {
16
22
  ".": {
@@ -18,12 +24,6 @@
18
24
  "import": "./dist/index.mjs"
19
25
  }
20
26
  },
21
- "files": [
22
- "dist",
23
- "README.md",
24
- "CHANGELOG.md"
25
- ],
26
- "packageManager": "pnpm@9.15.0",
27
27
  "scripts": {
28
28
  "build": "unbuild",
29
29
  "stub": "unbuild --stub",
@@ -38,13 +38,8 @@
38
38
  "prettier": ">=3"
39
39
  },
40
40
  "dependencies": {
41
- "@eslint/js": "^9.16.0",
42
- "eslint-config-prettier": "^9.1.0",
43
- "eslint-flat-config-utils": "^0.4.0",
44
- "eslint-import-resolver-typescript": "^3.7.0",
45
- "eslint-plugin-import-x": "^4.5.0",
46
- "eslint-plugin-prettier": "^5.2.1",
47
- "typescript-eslint": "^8.17.0"
41
+ "@sxzz/eslint-config": "^4.5.1",
42
+ "eslint-flat-config-utils": "^0.4.0"
48
43
  },
49
44
  "devDependencies": {
50
45
  "@tsconfig/node22": "^22.0.0",