@danielwaltz/eslint-config 0.0.4 → 0.0.6

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,40 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## v0.0.6
5
+
6
+ [compare changes](https://github.com/danielwaltz/eslint-config/compare/v0.0.5...v0.0.6)
7
+
8
+ ### 🚀 Enhancements
9
+
10
+ - Extend from sxzz eslint config ([2192f1e](https://github.com/danielwaltz/eslint-config/commit/2192f1e))
11
+
12
+ ### 📖 Documentation
13
+
14
+ - Add eslint and prettier to installation command ([8b42bf0](https://github.com/danielwaltz/eslint-config/commit/8b42bf0))
15
+
16
+ ### 🏡 Chore
17
+
18
+ - Add editorconfig ([2503c53](https://github.com/danielwaltz/eslint-config/commit/2503c53))
19
+ - Use package name import for project eslint config ([6756f9f](https://github.com/danielwaltz/eslint-config/commit/6756f9f))
20
+ - Update type assertions ([93159bc](https://github.com/danielwaltz/eslint-config/commit/93159bc))
21
+
22
+ ### ❤️ Contributors
23
+
24
+ - Daniel Waltz ([@danielwaltz](http://github.com/danielwaltz))
25
+
26
+ ## v0.0.5
27
+
28
+ [compare changes](https://github.com/danielwaltz/eslint-config/compare/v0.0.4...v0.0.5)
29
+
30
+ ### 🚀 Enhancements
31
+
32
+ - Export individual config collections ([585dfa1](https://github.com/danielwaltz/eslint-config/commit/585dfa1))
33
+
34
+ ### ❤️ Contributors
35
+
36
+ - Daniel Waltz ([@danielwaltz](http://github.com/danielwaltz))
37
+
4
38
  ## v0.0.4
5
39
 
6
40
  [compare changes](https://github.com/danielwaltz/eslint-config/compare/v0.0.3...v0.0.4)
package/README.md CHANGED
@@ -5,7 +5,7 @@ My personal ESLint configuration.
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 prettier @danielwaltz/eslint-config
9
9
  ```
10
10
 
11
11
  ## Usage
package/dist/index.d.mts CHANGED
@@ -1,6 +1,7 @@
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
+ export * from '@sxzz/eslint-config';
4
5
 
5
6
  declare function defineFlatConfigs(...configs: ResolvableFlatConfig[]): FlatConfigComposer;
6
7
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
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
+ export * from '@sxzz/eslint-config';
4
5
 
5
6
  declare function defineFlatConfigs(...configs: ResolvableFlatConfig[]): FlatConfigComposer;
6
7
 
package/dist/index.mjs CHANGED
@@ -1,96 +1,88 @@
1
- import prettier from 'eslint-plugin-prettier/recommended';
2
- import importPlugin 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 vueConfigs() {
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
- importPlugin.flatConfigs.recommended,
38
- importPlugin.flatConfigs.typescript,
39
- {
40
- files: ["**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,d.ts,vue}"],
8
+ files: ["**/*.vue"],
41
9
  rules: {
42
- "import-x/no-unresolved": ["error", { ignore: ["\\?*$"] }],
43
- "import-x/order": [
44
- "warn",
10
+ "vue/block-lang": ["error", { script: { lang: ["ts", "tsx"] } }],
11
+ "vue/block-order": [
12
+ "error",
13
+ { order: ["script", "template", "style"] }
14
+ ],
15
+ "vue/block-tag-newline": "error",
16
+ "vue/component-api-style": ["error", ["script-setup"]],
17
+ "vue/component-name-in-template-casing": "error",
18
+ "vue/component-options-name-casing": "error",
19
+ "vue/custom-event-name-casing": "error",
20
+ "vue/define-emits-declaration": ["error", "type-based"],
21
+ "vue/define-macros-order": [
22
+ "error",
45
23
  {
46
- groups: [
47
- "builtin",
48
- "external",
49
- "internal",
50
- "parent",
51
- "sibling",
52
- "index"
24
+ order: [
25
+ "definePageMeta",
26
+ "defineOptions",
27
+ "defineModal",
28
+ "defineProps",
29
+ "defineEmits",
30
+ "defineSlots"
53
31
  ],
54
- alphabetize: { order: "asc", caseInsensitive: false }
32
+ defineExposeLast: true
55
33
  }
56
- ]
57
- },
58
- name: "danielwaltz/import/customized"
59
- }
60
- ];
61
- }
62
-
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
- },
82
- {
83
- files: ["**/*.{ts,mts,cts,tsx,d.ts,vue,svelte,astro}"],
84
- rules: {
85
- "@typescript-eslint/consistent-type-imports": [
34
+ ],
35
+ "vue/define-props-declaration": ["error", "type-based"],
36
+ "vue/enforce-style-attribute": ["error", { allow: ["scoped"] }],
37
+ "vue/html-button-has-type": "error",
38
+ "vue/html-comment-content-newline": "error",
39
+ "vue/html-comment-content-spacing": "error",
40
+ "vue/html-comment-indent": "error",
41
+ "vue/match-component-file-name": [
86
42
  "error",
87
- { fixStyle: "inline-type-imports" }
43
+ { extensions: ["vue", "tsx"] }
88
44
  ],
89
- "@typescript-eslint/no-import-type-side-effects": "error"
90
- },
91
- name: "danielwaltz/typescript/customized"
45
+ "vue/match-component-import-name": "error",
46
+ "vue/next-tick-style": ["error", "promise"],
47
+ "vue/no-boolean-default": "error",
48
+ "vue/no-duplicate-attr-inheritance": "error",
49
+ "vue/no-empty-component-block": "error",
50
+ "vue/no-multiple-objects-in-class": "error",
51
+ "vue/no-ref-object-reactivity-loss": "error",
52
+ "vue/no-required-prop-with-default": ["error", { autofix: true }],
53
+ "vue/no-reserved-component-names": "error",
54
+ "vue/no-root-v-if": "error",
55
+ "vue/no-template-target-blank": "error",
56
+ "vue/no-unsupported-features": ["error", { version: "^3.5.0" }],
57
+ "vue/no-unused-emit-declarations": "error",
58
+ "vue/no-unused-properties": "error",
59
+ "vue/no-unused-refs": "error",
60
+ "vue/no-use-v-else-with-v-for": "error",
61
+ "vue/no-useless-mustaches": "error",
62
+ "vue/no-useless-v-bind": "error",
63
+ "vue/no-v-text": "error",
64
+ "vue/padding-line-between-blocks": "error",
65
+ "vue/prefer-define-options": "error",
66
+ "vue/prefer-prop-type-boolean-first": "error",
67
+ "vue/prefer-separate-static-class": "error",
68
+ "vue/prefer-true-attribute-shorthand": "error",
69
+ "vue/prefer-use-template-ref": "error",
70
+ "vue/require-direct-export": "error",
71
+ "vue/require-macro-variable-name": "error",
72
+ "vue/require-name-property": "error",
73
+ "vue/require-typed-ref": "error",
74
+ "vue/slot-name-casing": "error",
75
+ "vue/v-bind-style": [
76
+ "error",
77
+ "shorthand",
78
+ { sameNameShorthand: "always" }
79
+ ],
80
+ "vue/v-for-delimiter-style": "error",
81
+ "vue/v-on-function-call": "error",
82
+ "vue/valid-define-options": "error"
83
+ }
92
84
  }
93
- );
85
+ ];
94
86
  }
95
87
 
96
88
  function defineFlatConfigs(...configs) {
@@ -99,10 +91,9 @@ function defineFlatConfigs(...configs) {
99
91
 
100
92
  function danielwaltz(...userConfigs) {
101
93
  const composer = defineFlatConfigs(...userConfigs);
102
- composer.prepend(globalConfigs());
103
- composer.append(typescriptConfigs());
104
- composer.append(importConfigs());
105
- composer.append(formattingConfigs());
94
+ composer.append(sxzz());
95
+ if (hasVue)
96
+ composer.append(vueConfigs());
106
97
  return composer;
107
98
  }
108
99
 
package/package.json CHANGED
@@ -1,16 +1,22 @@
1
1
  {
2
2
  "name": "@danielwaltz/eslint-config",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
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",