@coko/lint 3.0.0-alpha.10 → 3.0.0-alpha.12
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 +4 -0
- package/package.json +24 -30
- package/src/{cli.js → cli.mjs} +3 -6
- package/src/commitizen.js +4 -5
- package/src/eslint.mjs +0 -13
- package/src/index.mjs +3 -3
- package/src/{lintstaged.js → lintstaged.mjs} +1 -1
- package/src/{prettier.js → prettier.mjs} +1 -1
- package/src/{stylelint.js → stylelint.mjs} +1 -1
- package/src/airbnb/variables.mjs +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.0.0-alpha.12](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.11...v3.0.0-alpha.12) (2026-01-19)
|
|
6
|
+
|
|
7
|
+
## [3.0.0-alpha.11](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.10...v3.0.0-alpha.11) (2026-01-19)
|
|
8
|
+
|
|
5
9
|
## [3.0.0-alpha.10](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.9...v3.0.0-alpha.10) (2025-12-02)
|
|
6
10
|
|
|
7
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coko/lint",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.12",
|
|
4
4
|
"description": "Linter configurations and dependencies for coko's projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lint",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": "^22.16.0"
|
|
18
18
|
},
|
|
19
|
-
"main": "src/index.
|
|
19
|
+
"main": "src/index.js",
|
|
20
20
|
"bin": {
|
|
21
21
|
"coko-lint": "./src/cli.js"
|
|
22
22
|
},
|
|
@@ -35,49 +35,43 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@babel/core": "^7.28.
|
|
39
|
-
"@babel/eslint-parser": "^7.28.
|
|
40
|
-
"@babel/preset-react": "^7.
|
|
41
|
-
"@commitlint/cli": "^20.1
|
|
42
|
-
"@commitlint/config-conventional": "^20.
|
|
43
|
-
"@eslint/
|
|
44
|
-
"@eslint
|
|
45
|
-
"
|
|
46
|
-
"commander": "^14.0.1",
|
|
38
|
+
"@babel/core": "^7.28.6",
|
|
39
|
+
"@babel/eslint-parser": "^7.28.6",
|
|
40
|
+
"@babel/preset-react": "^7.28.5",
|
|
41
|
+
"@commitlint/cli": "^20.3.1",
|
|
42
|
+
"@commitlint/config-conventional": "^20.3.1",
|
|
43
|
+
"@eslint/js": "^9.39.2",
|
|
44
|
+
"@vitest/eslint-plugin": "^1.6.6",
|
|
45
|
+
"commander": "^14.0.2",
|
|
47
46
|
"commitizen": "^4.3.1",
|
|
48
47
|
"conventional-commit-types": "^3.0.0",
|
|
49
48
|
"cz-conventional-changelog": "^3.3.0",
|
|
50
|
-
"cz-customizable": "^
|
|
51
|
-
"eslint": "^9.
|
|
52
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
49
|
+
"cz-customizable": "^7.5.1",
|
|
50
|
+
"eslint": "^9.39.2",
|
|
53
51
|
"eslint-config-prettier": "^10.1.8",
|
|
54
|
-
"eslint-config-standard": "^17.1.0",
|
|
55
|
-
"eslint-config-standard-react": "^13.0.0",
|
|
56
52
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
57
|
-
"eslint-plugin-cypress": "^5.2.
|
|
53
|
+
"eslint-plugin-cypress": "^5.2.1",
|
|
58
54
|
"eslint-plugin-import": "^2.32.0",
|
|
59
|
-
"eslint-plugin-jest": "^29.
|
|
55
|
+
"eslint-plugin-jest": "^29.12.1",
|
|
60
56
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
61
|
-
"eslint-plugin-n": "^17.23.
|
|
57
|
+
"eslint-plugin-n": "^17.23.2",
|
|
62
58
|
"eslint-plugin-promise": "^7.2.1",
|
|
63
59
|
"eslint-plugin-react": "^7.37.5",
|
|
64
|
-
"eslint-plugin-react-hooks": "^7.0.
|
|
65
|
-
"eslint-plugin-workspaces": "^0.11.
|
|
66
|
-
"globals": "^
|
|
60
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
61
|
+
"eslint-plugin-workspaces": "^0.11.1",
|
|
62
|
+
"globals": "^17.0.0",
|
|
67
63
|
"husky": "^9.1.7",
|
|
68
|
-
"lint-staged": "^16.2.
|
|
69
|
-
"longest": "^2.0.1",
|
|
64
|
+
"lint-staged": "^16.2.7",
|
|
70
65
|
"postcss": "^8.5.6",
|
|
71
66
|
"postcss-scss": "^4.0.9",
|
|
72
|
-
"prettier": "^3.
|
|
73
|
-
"
|
|
74
|
-
"stylelint": "^
|
|
75
|
-
"stylelint-config-standard-scss": "^16.0.0",
|
|
67
|
+
"prettier": "^3.8.0",
|
|
68
|
+
"stylelint": "^17.0.0",
|
|
69
|
+
"stylelint-config-standard-scss": "^17.0.0",
|
|
76
70
|
"stylelint-config-styled-components": "^0.1.1",
|
|
77
|
-
"stylelint-order": "^7.0.
|
|
71
|
+
"stylelint-order": "^7.0.1",
|
|
78
72
|
"stylelint-processor-styled-components": "^1.10.0",
|
|
79
73
|
"typescript": "^5.9.3",
|
|
80
|
-
"typescript-eslint": "^8.
|
|
74
|
+
"typescript-eslint": "^8.53.0"
|
|
81
75
|
},
|
|
82
76
|
"devDependencies": {
|
|
83
77
|
"standard-version": "^9.5.0"
|
package/src/{cli.js → cli.mjs}
RENAMED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable no-console, n/no-process-exit */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const { program } = require('commander')
|
|
6
|
-
const { execSync } = require('child_process')
|
|
3
|
+
import { execSync } from 'child_process'
|
|
4
|
+
import { program } from 'commander'
|
|
7
5
|
|
|
8
6
|
const pkg = require('../package.json')
|
|
9
7
|
|
|
@@ -70,7 +68,6 @@ const runAll = (options = {}) => {
|
|
|
70
68
|
[runPrettier, PRETTIER, options.skipPrettier],
|
|
71
69
|
]
|
|
72
70
|
|
|
73
|
-
/* eslint-disable-next-line no-restricted-syntax */
|
|
74
71
|
for (const process of processes) {
|
|
75
72
|
try {
|
|
76
73
|
runSubprocess(...process)
|
package/src/commitizen.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
const longest = require('longest')
|
|
2
|
-
const rightPad = require('right-pad')
|
|
3
1
|
const conventionalCommitTypes = require('conventional-commit-types')
|
|
4
2
|
|
|
5
|
-
// Borrowed from cz-conventional-changelog
|
|
6
3
|
const { types } = conventionalCommitTypes
|
|
7
|
-
const
|
|
4
|
+
const maxLength = Math.max(Object.keys(types).map(key => key.length)) + 1
|
|
8
5
|
|
|
9
6
|
const choices = Object.keys(types).map(key => {
|
|
10
7
|
const type = types[key]
|
|
8
|
+
const name = `${`${key}:`.padEnd(maxLength)} ${type.description}`
|
|
9
|
+
|
|
11
10
|
return {
|
|
12
|
-
name
|
|
11
|
+
name,
|
|
13
12
|
value: key,
|
|
14
13
|
}
|
|
15
14
|
})
|
package/src/eslint.mjs
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
// import path from 'path'
|
|
2
|
-
|
|
3
1
|
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
4
2
|
import js from '@eslint/js'
|
|
5
|
-
// import { FlatCompat } from '@eslint/eslintrc'
|
|
6
3
|
|
|
7
4
|
import globals from 'globals'
|
|
8
5
|
import tseslint from 'typescript-eslint'
|
|
@@ -15,16 +12,6 @@ import workspaces from 'eslint-plugin-workspaces'
|
|
|
15
12
|
// import jest from 'eslint-plugin-jest'
|
|
16
13
|
// import cypressPlugin from 'eslint-plugin-cypress'
|
|
17
14
|
|
|
18
|
-
// const __filename = fileURLToPath(import.meta.url)
|
|
19
|
-
// const __dirname = path.dirname(__filename)
|
|
20
|
-
|
|
21
|
-
// const compat = new FlatCompat({
|
|
22
|
-
// // baseDirectory: __dirname,
|
|
23
|
-
// resolvePluginsRelativeTo: import.meta.url,
|
|
24
|
-
// // recommendedConfig: js.configs.recommended,
|
|
25
|
-
// // allConfig: js.configs.all,
|
|
26
|
-
// })
|
|
27
|
-
|
|
28
15
|
/**
|
|
29
16
|
* TO DO
|
|
30
17
|
*
|
package/src/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import commitizen from './commitizen'
|
|
2
2
|
import { defineEslintConfig, serverEslintConfig } from './eslint.mjs'
|
|
3
|
-
import prettier from './prettier'
|
|
4
|
-
import stylelint from './stylelint'
|
|
5
|
-
import lintstaged from './lintstaged'
|
|
3
|
+
import prettier from './prettier.mjs'
|
|
4
|
+
import stylelint from './stylelint.mjs'
|
|
5
|
+
import lintstaged from './lintstaged.mjs'
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
8
|
defineEslintConfig,
|
package/src/airbnb/variables.mjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// const confusingBrowserGlobals = require('confusing-browser-globals')
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
rules: {
|
|
5
|
-
// disallow specific globals
|
|
6
|
-
'no-restricted-globals': [
|
|
7
|
-
'error',
|
|
8
|
-
{
|
|
9
|
-
name: 'isFinite',
|
|
10
|
-
message:
|
|
11
|
-
'Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite',
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
name: 'isNaN',
|
|
15
|
-
message:
|
|
16
|
-
'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
|
|
17
|
-
},
|
|
18
|
-
]
|
|
19
|
-
.concat
|
|
20
|
-
// confusingBrowserGlobals.map(g => ({
|
|
21
|
-
// name: g,
|
|
22
|
-
// message: `Use window.${g} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,
|
|
23
|
-
// })),
|
|
24
|
-
(),
|
|
25
|
-
},
|
|
26
|
-
}
|