@joshdb/eslint-config 1.1.0-next.10ed637.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/CHANGELOG.md +3 -0
- package/README.md +53 -0
- package/eslint-config.json +107 -0
- package/package.json +56 -0
package/CHANGELOG.md
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
# @joshdb/eslint-config
|
|
6
|
+
|
|
7
|
+
**ESLint configuration for all Josh Project repositories.**
|
|
8
|
+
|
|
9
|
+
[](https://github.com/josh-development/utilities/blob/main/LICENSE.md)
|
|
10
|
+
[](https://codecov.io/gh/josh-development/utilities)
|
|
11
|
+
[](https://www.npmjs.com/package/@joshdb/eslint-config)
|
|
12
|
+
|
|
13
|
+
[](https://discord.gg/N7ZKH3P)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
You can use the following command to install this package, or replace `npm install` with your package manager of choice.
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm install @joshdb/eslint-config
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
Add the ESLint config to your `package.json`:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"name": "my-project",
|
|
32
|
+
"eslintConfig": {
|
|
33
|
+
"extends": "@joshdb/eslint-config"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or to your `.eslintrc.js` / `.eslintrc.json`:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"extends": "@joshdb/eslint-config"
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Create `tsconfig.eslint.json` next to the eslint config file, for example with content:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"extends": "./tsconfig.base.json",
|
|
51
|
+
"include": ["src", "tests"]
|
|
52
|
+
}
|
|
53
|
+
```
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@sapphire",
|
|
3
|
+
"rules": {
|
|
4
|
+
"@typescript-eslint/class-literal-property-style": "off",
|
|
5
|
+
"@typescript-eslint/dot-notation": ["error", { "allowPrivateClassPropertyAccess": true, "allowProtectedClassPropertyAccess": true }],
|
|
6
|
+
"@typescript-eslint/member-ordering": [
|
|
7
|
+
"error",
|
|
8
|
+
{
|
|
9
|
+
"default": [
|
|
10
|
+
"signature",
|
|
11
|
+
|
|
12
|
+
["public-instance-field", "public-decorated-field"],
|
|
13
|
+
"public-abstract-field",
|
|
14
|
+
["protected-instance-field", "protected-decorated-field"],
|
|
15
|
+
"protected-abstract-field",
|
|
16
|
+
["private-instance-field", "private-decorated-field"],
|
|
17
|
+
"private-abstract-field",
|
|
18
|
+
["instance-field", "decorated-field"],
|
|
19
|
+
"abstract-field",
|
|
20
|
+
|
|
21
|
+
"public-constructor",
|
|
22
|
+
"protected-constructor",
|
|
23
|
+
"private-constructor",
|
|
24
|
+
"constructor",
|
|
25
|
+
|
|
26
|
+
["public-instance-get", "public-decorated-get"],
|
|
27
|
+
["public-instance-set", "public-decorated-set"],
|
|
28
|
+
"public-abstract-get",
|
|
29
|
+
"public-abstract-set",
|
|
30
|
+
["protected-instance-get", "protected-decorated-get"],
|
|
31
|
+
["protected-instance-set", "protected-decorated-set"],
|
|
32
|
+
"protected-abstract-get",
|
|
33
|
+
"protected-abstract-set",
|
|
34
|
+
["private-instance-get", "private-decorated-get"],
|
|
35
|
+
["private-instance-set", "private-decorated-set"],
|
|
36
|
+
"private-abstract-get",
|
|
37
|
+
"private-abstract-set",
|
|
38
|
+
["instance-get", "decorated-get"],
|
|
39
|
+
["instance-set", "decorated-set"],
|
|
40
|
+
"abstract-get",
|
|
41
|
+
"abstract-set",
|
|
42
|
+
|
|
43
|
+
["public-instance-method", "public-decorated-method"],
|
|
44
|
+
"public-abstract-method",
|
|
45
|
+
["protected-instance-method", "protected-decorated-method"],
|
|
46
|
+
"protected-abstract-method",
|
|
47
|
+
["private-instance-method", "private-decorated-method"],
|
|
48
|
+
"private-abstract-method",
|
|
49
|
+
["instance-method", "decorated-method"],
|
|
50
|
+
"abstract-method",
|
|
51
|
+
|
|
52
|
+
"public-static-field",
|
|
53
|
+
"protected-static-field",
|
|
54
|
+
"private-static-field",
|
|
55
|
+
"static-field",
|
|
56
|
+
|
|
57
|
+
"public-static-get",
|
|
58
|
+
"public-static-set",
|
|
59
|
+
"protected-static-get",
|
|
60
|
+
"protected-static-set",
|
|
61
|
+
"private-static-get",
|
|
62
|
+
"private-static-set",
|
|
63
|
+
"static-get",
|
|
64
|
+
"static-set",
|
|
65
|
+
|
|
66
|
+
"public-static-method",
|
|
67
|
+
"protected-static-method",
|
|
68
|
+
"private-static-method",
|
|
69
|
+
"static-method"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"@typescript-eslint/no-namespace": "off",
|
|
74
|
+
"curly": ["error", "multi-line"],
|
|
75
|
+
"no-lone-blocks": "error",
|
|
76
|
+
"no-tabs": "error",
|
|
77
|
+
"padding-line-between-statements": [
|
|
78
|
+
"error",
|
|
79
|
+
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*" },
|
|
80
|
+
{ "blankLine": "always", "prev": "*", "next": ["const", "let", "var"] },
|
|
81
|
+
{ "blankLine": "never", "prev": ["const", "let", "var"], "next": ["const", "let", "var"] },
|
|
82
|
+
{ "blankLine": "never", "prev": "case", "next": "case" },
|
|
83
|
+
{ "blankLine": "never", "prev": "for", "next": "for" },
|
|
84
|
+
{ "blankLine": "never", "prev": "if", "next": "if" },
|
|
85
|
+
{
|
|
86
|
+
"blankLine": "always",
|
|
87
|
+
"prev": [
|
|
88
|
+
"block-like",
|
|
89
|
+
"break",
|
|
90
|
+
"case",
|
|
91
|
+
"class",
|
|
92
|
+
"continue",
|
|
93
|
+
"default",
|
|
94
|
+
"multiline-const",
|
|
95
|
+
"multiline-expression",
|
|
96
|
+
"multiline-let",
|
|
97
|
+
"multiline-var",
|
|
98
|
+
"return",
|
|
99
|
+
"switch",
|
|
100
|
+
"try"
|
|
101
|
+
],
|
|
102
|
+
"next": "*"
|
|
103
|
+
},
|
|
104
|
+
{ "blankLine": "always", "prev": "*", "next": ["case", "default"] }
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@joshdb/eslint-config",
|
|
3
|
+
"version": "1.1.0-next.10ed637.0",
|
|
4
|
+
"description": "Standard ESLint config for the Josh Project",
|
|
5
|
+
"author": "Évelyne Lachance <eslachance@gmail.com> (https://evie.codes/)",
|
|
6
|
+
"contributors": [
|
|
7
|
+
"Hezekiah Hendry <hezekiah.hendry@gmail.com>"
|
|
8
|
+
],
|
|
9
|
+
"main": "eslint-config.json",
|
|
10
|
+
"exports": {
|
|
11
|
+
"import": "./eslint-config.json",
|
|
12
|
+
"require": "./eslint-config.json"
|
|
13
|
+
},
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"scripts": {
|
|
16
|
+
"lint": "eslint src tests --ext ts --fix -c ../../.eslintrc",
|
|
17
|
+
"bump": "cliff-jumper",
|
|
18
|
+
"check-update": "cliff-jumper --dry-run"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@sapphire/eslint-config": "^4.3.8",
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
|
23
|
+
"@typescript-eslint/parser": "^5.42.1",
|
|
24
|
+
"eslint": "^8.27.0",
|
|
25
|
+
"eslint-config-prettier": "^8.5.0",
|
|
26
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
27
|
+
"prettier": "^2.7.1",
|
|
28
|
+
"typescript": "^4.8.4"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@favware/cliff-jumper": "^1.8.8",
|
|
32
|
+
"typedoc": "^0.23.20",
|
|
33
|
+
"typedoc-json-parser": "^7.0.1"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/josh-development/utilities.git"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"eslint-config.json"
|
|
41
|
+
],
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=16.6.0",
|
|
44
|
+
"npm": ">=7"
|
|
45
|
+
},
|
|
46
|
+
"keywords": [
|
|
47
|
+
"eslint"
|
|
48
|
+
],
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/josh-development/utilities/issues"
|
|
51
|
+
},
|
|
52
|
+
"homepage": "https://josh.evie.dev",
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
}
|
|
56
|
+
}
|