@wopjs/eslint-config 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/LICENSE.txt +21 -0
- package/README.md +65 -0
- package/eslint.config.mjs +1 -0
- package/package.json +55 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 wopjs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# @wopjs/eslint-config
|
|
2
|
+
|
|
3
|
+
[](https://github.com/wopjs/eslint-config/actions/workflows/build.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@wopjs/eslint-config)
|
|
5
|
+
|
|
6
|
+
Wopjs eslint config. It aims to enforce code style that is consistent and diff-friendly, easy to review.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- Flat config.
|
|
11
|
+
- Respects `.gitignore`.
|
|
12
|
+
- Prettier compatible.
|
|
13
|
+
- TypeScript configured.
|
|
14
|
+
- Import sorting and field sorting.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
npm add @wopjs/eslint-config
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
// eslint.config.js
|
|
26
|
+
import wopjs from "@wopjs/eslint-config";
|
|
27
|
+
|
|
28
|
+
export default wopjs;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Add your own rules to the flat config.
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
// eslint.config.js
|
|
35
|
+
import wopjs from "@wopjs/eslint-config";
|
|
36
|
+
|
|
37
|
+
export default {
|
|
38
|
+
...wopjs,
|
|
39
|
+
{
|
|
40
|
+
rules: {
|
|
41
|
+
"no-console": "off",
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Development
|
|
48
|
+
|
|
49
|
+
### Publish New Version
|
|
50
|
+
|
|
51
|
+
You can use [npm version](https://docs.npmjs.com/cli/v10/commands/npm-version) to bump version.
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
npm version patch
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Push the tag to remote and CI will publish the new version to npm.
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
git push --follow-tags
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### CI Auto Publish
|
|
64
|
+
|
|
65
|
+
If you want to publish the package in CI, you need to set the `NPM_TOKEN` secrets [in GitHub repository settings](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository). See how to [create a NPM access token](https://docs.npmjs.com/creating-and-viewing-access-tokens).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./index.js";
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wopjs/eslint-config",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Wopjs eslint config that aims to enforce code style that is consistent and diff-friendly, easy to review.",
|
|
5
|
+
"repository": "wopjs/eslint-config",
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"types": "./index.d.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"files": [
|
|
11
|
+
"eslint.config.mjs",
|
|
12
|
+
"eslint.config.d.mts"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"lint": "eslint && prettier --check .",
|
|
16
|
+
"lint:fix": "eslint --fix && prettier --write ."
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"eslint",
|
|
20
|
+
"eslint-config",
|
|
21
|
+
"typescript",
|
|
22
|
+
"sort"
|
|
23
|
+
],
|
|
24
|
+
"maintainers": [
|
|
25
|
+
{
|
|
26
|
+
"name": "CRIMX",
|
|
27
|
+
"email": "straybugs@gmail.com",
|
|
28
|
+
"url": "https://github.com/crimx/"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "hyrious",
|
|
32
|
+
"email": "hyrious@outlook.com",
|
|
33
|
+
"url": "https://github.com/hyrious/"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"eslint": "9.x"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@eslint/js": "^9.18.0",
|
|
42
|
+
"eslint-config-flat-gitignore": "^1.0.0",
|
|
43
|
+
"eslint-config-prettier": "^10.0.1",
|
|
44
|
+
"eslint-plugin-import-x": "^4.6.1",
|
|
45
|
+
"eslint-plugin-jsonc": "^2.18.2",
|
|
46
|
+
"eslint-plugin-perfectionist": "^4.6.0",
|
|
47
|
+
"typescript-eslint": "^8.20.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/node": "^22.10.6",
|
|
51
|
+
"eslint": "^9.18.0",
|
|
52
|
+
"prettier": "^3.4.2",
|
|
53
|
+
"typescript": "^5.7.3"
|
|
54
|
+
}
|
|
55
|
+
}
|