@kitql/eslint-config 0.3.2 → 0.3.4

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.
Files changed (3) hide show
  1. package/.prettierrc.cjs +2 -1
  2. package/cmd.js +20 -1
  3. package/package.json +10 -10
package/.prettierrc.cjs CHANGED
@@ -2,6 +2,7 @@ const { plugins, ...prettierConfig } = require('@theguild/prettier-config')
2
2
 
3
3
  module.exports = {
4
4
  ...prettierConfig,
5
+ singleQuote: true,
5
6
  semi: false,
6
7
  arrowParens: 'always',
7
8
  plugins: [
@@ -15,7 +16,7 @@ module.exports = {
15
16
  '',
16
17
  '^(\\$houdini)(.*)$', // special
17
18
  '^(remult)(.*)$', // special
18
- '^(remult-kit)(.*)$', // special
19
+ '^(firstly)(.*)$', // special
19
20
  '^(@kitql)(.*)$', // special
20
21
  '',
21
22
  '^(\\$env)(.*)$', // special sveltekit
package/cmd.js CHANGED
@@ -10,6 +10,13 @@ const log = new Log('kitql-lint')
10
10
  program.addOption(new Option('-f, --format', 'format'))
11
11
  program.addOption(new Option('-g, --glob <type>', 'file/dir/glob (. by default)', '.'))
12
12
  program.addOption(new Option('--verbose', 'add more logs', false))
13
+ program.addOption(
14
+ new Option(
15
+ '-p, --prefix <type>',
16
+ 'prefix by with "pnpm" or "npm" or "none" ("none" by default)',
17
+ 'none',
18
+ ),
19
+ )
13
20
 
14
21
  program.parse(process.argv)
15
22
  const options_cli = program.opts()
@@ -37,9 +44,20 @@ let pathPrettierCjs = findFileOrUp('.prettierrc.cjs')
37
44
  const format = options_cli.format ?? false
38
45
  const glob = options_cli.glob ?? '.'
39
46
  const verbose = options_cli.verbose ?? false
47
+ const pre = options_cli.prefix ?? 'none'
48
+
49
+ let preToUse = ''
50
+ if (pre === 'npm') {
51
+ preToUse = 'npm exec '
52
+ } else if (pre === 'pnpm') {
53
+ preToUse = 'pnpm '
54
+ } else {
55
+ preToUse = ''
56
+ }
40
57
 
41
58
  // First prettier
42
59
  const cmdPrettier =
60
+ preToUse +
43
61
  `prettier` +
44
62
  ` --list-different` +
45
63
  // ignore?
@@ -87,6 +105,7 @@ if (format && verbose) {
87
105
  function esLintRun(code) {
88
106
  // Then eslint
89
107
  const cmdEsLint =
108
+ preToUse +
90
109
  `eslint` +
91
110
  // ignore?
92
111
  ` --ignore-path ${pathPrettierIgnore}` +
@@ -137,7 +156,7 @@ result_prettier.stdout.on('readable', (data) => {
137
156
  }
138
157
  })
139
158
  result_prettier.stdout.on('resume', (data) => {
140
- if (verbose) {
159
+ if (verbose && data) {
141
160
  log.info(`resume`, data)
142
161
  }
143
162
  esLintRun(0)
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "eslint",
7
7
  "eslint-config"
8
8
  ],
9
- "version": "0.3.2",
9
+ "version": "0.3.4",
10
10
  "license": "MIT",
11
11
  "type": "module",
12
12
  "repository": {
@@ -22,22 +22,22 @@
22
22
  "dependencies": {
23
23
  "@graphql-eslint/eslint-plugin": "3.20.1",
24
24
  "@kitql/helpers": "0.8.9",
25
- "@theguild/eslint-config": "^0.11.1",
25
+ "@theguild/eslint-config": "^0.12.0",
26
26
  "@theguild/prettier-config": "2.0.2",
27
- "@typescript-eslint/eslint-plugin": "7.2.0",
28
- "@typescript-eslint/parser": "7.2.0",
27
+ "@typescript-eslint/eslint-plugin": "7.18.0",
28
+ "@typescript-eslint/parser": "7.18.0",
29
29
  "@vue/compiler-sfc": "3.4.7",
30
30
  "commander": "^12.0.0",
31
31
  "eslint": "8.57.0",
32
32
  "eslint-config-prettier": "9.1.0",
33
- "eslint-plugin-svelte": "2.35.0",
34
- "eslint-plugin-unused-imports": "3.1.0",
35
- "prettier": "3.2.4",
33
+ "eslint-plugin-svelte": "2.43.0",
34
+ "eslint-plugin-unused-imports": "3.2.0",
35
+ "prettier": "3.3.3",
36
36
  "prettier-plugin-sh": "0.14.0",
37
37
  "prettier-plugin-svelte": "3.2.2",
38
- "prettier-plugin-tailwindcss": "0.5.7",
38
+ "prettier-plugin-tailwindcss": "0.6.6",
39
39
  "svelte": "4.2.0",
40
- "typescript": "5.4.2"
40
+ "typescript": "5.5.4"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "publishConfig": {
@@ -51,7 +51,7 @@
51
51
  ".prettierrc.cjs"
52
52
  ],
53
53
  "scripts": {
54
- "lint": "node ./cmd.js",
54
+ "lint": "node ./cmd.js --verbose -p none",
55
55
  "format": "node ./cmd.js -f",
56
56
  "lint:example": "kitql-lint",
57
57
  "format:example": "kitql-lint --format"