@elementx-ai/eslint-config 6.0.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/.github/workflows/release-please.yml +63 -0
- package/CHANGELOG.md +213 -0
- package/README.md +22 -0
- package/configs/node.js +5 -0
- package/configs/typescript.js +6 -0
- package/index.js +3 -0
- package/lib/common.js +124 -0
- package/lib/typescript.js +69 -0
- package/package.json +27 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Release please
|
|
2
|
+
|
|
3
|
+
env:
|
|
4
|
+
RELEASE_TYPE: node
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
- main
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release-please:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
outputs:
|
|
16
|
+
releases_created: ${{ steps.release.outputs.releases_created }}
|
|
17
|
+
major: ${{ steps.release.outputs.major }}
|
|
18
|
+
minor: ${{ steps.release.outputs.minor }}
|
|
19
|
+
patch: ${{ steps.release.outputs.patch }}
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Release please
|
|
23
|
+
uses: google-github-actions/release-please-action@v3
|
|
24
|
+
id: release
|
|
25
|
+
with:
|
|
26
|
+
release-type: ${{ env.RELEASE_TYPE }}
|
|
27
|
+
package-name: release-please-action
|
|
28
|
+
|
|
29
|
+
build-and-publish-ghcr:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
needs: [release-please]
|
|
32
|
+
if: needs.release-please.outputs.releases_created
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v3
|
|
35
|
+
|
|
36
|
+
- run: npm ci
|
|
37
|
+
|
|
38
|
+
- uses: actions/setup-node@v3
|
|
39
|
+
with:
|
|
40
|
+
registry-url: "https://npm.pkg.github.com"
|
|
41
|
+
scope: "@spark64"
|
|
42
|
+
|
|
43
|
+
- run: npm publish
|
|
44
|
+
env:
|
|
45
|
+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
46
|
+
|
|
47
|
+
build-and-publish-npm:
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
needs: [release-please]
|
|
50
|
+
if: needs.release-please.outputs.releases_created
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v3
|
|
53
|
+
|
|
54
|
+
- uses: actions/setup-node@v3
|
|
55
|
+
with:
|
|
56
|
+
registry-url: "https://registry.npmjs.org"
|
|
57
|
+
scope: "@elementx-ai"
|
|
58
|
+
|
|
59
|
+
- run: npm ci
|
|
60
|
+
|
|
61
|
+
- run: npm publish --access public
|
|
62
|
+
env:
|
|
63
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
This repository adheres to semantic versioning and follows the conventions of [keepachangelog.com](http://keepachangelog.com)
|
|
4
|
+
|
|
5
|
+
## [6.0.0](https://github.com/spark-64/eslint-config/compare/v5.0.7...v6.0.0) (2022-08-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* Enforce strong typescript naming conventions, move presets to configs dir (#13)
|
|
11
|
+
* Rename eslint-config repo, typescriptService as typescript (#11)
|
|
12
|
+
* Change config name from eslint-config-spoke to eslint-config-danieljimeneznz (#7)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Change config name from eslint-config-spoke to eslint-config-danieljimeneznz ([#7](https://github.com/spark-64/eslint-config/issues/7)) ([06b3675](https://github.com/spark-64/eslint-config/commit/06b3675b8f609cc159966ec6e8035568168d4c7b))
|
|
17
|
+
* Enforce strong typescript naming conventions, move presets to configs dir ([#13](https://github.com/spark-64/eslint-config/issues/13)) ([078af5f](https://github.com/spark-64/eslint-config/commit/078af5faaa6e6659040547c73292041c59baad35))
|
|
18
|
+
* Rename eslint-config repo, typescriptService as typescript ([#11](https://github.com/spark-64/eslint-config/issues/11)) ([944edb6](https://github.com/spark-64/eslint-config/commit/944edb61acd3a04c4433596df7477331d57138c2))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* Add missing `format` from [@typescript-eslint](https://github.com/typescript-eslint) rules ([#21](https://github.com/spark-64/eslint-config/issues/21)) ([780be0f](https://github.com/spark-64/eslint-config/commit/780be0f2876cd8350b25cf4a08504fdceb104dec))
|
|
24
|
+
* Add release-please for version management, publish to npmjs ([#3](https://github.com/spark-64/eslint-config/issues/3)) ([40fec4e](https://github.com/spark-64/eslint-config/commit/40fec4ef78ef74281f764223de959454f990a5b7))
|
|
25
|
+
* Allow destructured variables to be snake case, closes [#28](https://github.com/spark-64/eslint-config/issues/28) ([#29](https://github.com/spark-64/eslint-config/issues/29)) ([f748b96](https://github.com/spark-64/eslint-config/commit/f748b96dc17d6e17109cee8963ce57c2bba36920))
|
|
26
|
+
* Allow leadingUnderscore for const variable names ([#23](https://github.com/spark-64/eslint-config/issues/23)) ([62bc3be](https://github.com/spark-64/eslint-config/commit/62bc3be5e344a3dcae2ca1e275a2248bffaa6ceb))
|
|
27
|
+
* Incorrect typescript rules, add curly eslint rule ([#15](https://github.com/spark-64/eslint-config/issues/15)) ([7cc8c9f](https://github.com/spark-64/eslint-config/commit/7cc8c9f69286557ce98eb5b7fe81104b805734e0))
|
|
28
|
+
* Move most peerDeps into deps as these are required ([#26](https://github.com/spark-64/eslint-config/issues/26)) ([4da1cca](https://github.com/spark-64/eslint-config/commit/4da1cca46b80453ecd62c71ecd177ccf9731127b))
|
|
29
|
+
* Move prefer-arrow/import plugins from extends to plugin ([#9](https://github.com/spark-64/eslint-config/issues/9)) ([812687d](https://github.com/spark-64/eslint-config/commit/812687db7e4b166c3d466bd8df066f1802b14ece))
|
|
30
|
+
* Removed extreneous max-len `ignorePattern` ([#17](https://github.com/spark-64/eslint-config/issues/17)) ([11d56fc](https://github.com/spark-64/eslint-config/commit/11d56fc02f86b0ead3e6d89fb178cf1290c6bfb6))
|
|
31
|
+
* Space after `strictCamelCase` ([#19](https://github.com/spark-64/eslint-config/issues/19)) ([64d995a](https://github.com/spark-64/eslint-config/commit/64d995a8b793805a65212e81103a36f8f167d991))
|
|
32
|
+
|
|
33
|
+
## [5.0.7](https://github.com/danieljimeneznz/eslint-config/compare/v5.0.6...v5.0.7) (2022-07-02)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* Allow destructured variables to be snake case, closes [#28](https://github.com/danieljimeneznz/eslint-config/issues/28) ([#29](https://github.com/danieljimeneznz/eslint-config/issues/29)) ([f748b96](https://github.com/danieljimeneznz/eslint-config/commit/f748b96dc17d6e17109cee8963ce57c2bba36920))
|
|
39
|
+
|
|
40
|
+
## [5.0.6](https://github.com/danieljimeneznz/eslint-config/compare/v5.0.5...v5.0.6) (2022-06-21)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* Move most peerDeps into deps as these are required ([#26](https://github.com/danieljimeneznz/eslint-config/issues/26)) ([4da1cca](https://github.com/danieljimeneznz/eslint-config/commit/4da1cca46b80453ecd62c71ecd177ccf9731127b))
|
|
46
|
+
|
|
47
|
+
## [5.0.5](https://github.com/danieljimeneznz/eslint-config/compare/v5.0.4...v5.0.5) (2022-06-18)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Bug Fixes
|
|
51
|
+
|
|
52
|
+
* Allow leadingUnderscore for const variable names ([#23](https://github.com/danieljimeneznz/eslint-config/issues/23)) ([62bc3be](https://github.com/danieljimeneznz/eslint-config/commit/62bc3be5e344a3dcae2ca1e275a2248bffaa6ceb))
|
|
53
|
+
|
|
54
|
+
## [5.0.4](https://github.com/danieljimeneznz/eslint-config/compare/v5.0.3...v5.0.4) (2022-06-18)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
* Add missing `format` from [@typescript-eslint](https://github.com/typescript-eslint) rules ([#21](https://github.com/danieljimeneznz/eslint-config/issues/21)) ([780be0f](https://github.com/danieljimeneznz/eslint-config/commit/780be0f2876cd8350b25cf4a08504fdceb104dec))
|
|
60
|
+
|
|
61
|
+
## [5.0.3](https://github.com/danieljimeneznz/eslint-config/compare/v5.0.2...v5.0.3) (2022-06-18)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
* Space after `strictCamelCase` ([#19](https://github.com/danieljimeneznz/eslint-config/issues/19)) ([64d995a](https://github.com/danieljimeneznz/eslint-config/commit/64d995a8b793805a65212e81103a36f8f167d991))
|
|
67
|
+
|
|
68
|
+
## [5.0.2](https://github.com/danieljimeneznz/eslint-config/compare/v5.0.1...v5.0.2) (2022-06-18)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### Bug Fixes
|
|
72
|
+
|
|
73
|
+
* Removed extreneous max-len `ignorePattern` ([#17](https://github.com/danieljimeneznz/eslint-config/issues/17)) ([11d56fc](https://github.com/danieljimeneznz/eslint-config/commit/11d56fc02f86b0ead3e6d89fb178cf1290c6bfb6))
|
|
74
|
+
|
|
75
|
+
## [5.0.1](https://github.com/danieljimeneznz/eslint-config/compare/v5.0.0...v5.0.1) (2022-06-18)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Bug Fixes
|
|
79
|
+
|
|
80
|
+
* Incorrect typescript rules, add curly eslint rule ([#15](https://github.com/danieljimeneznz/eslint-config/issues/15)) ([7cc8c9f](https://github.com/danieljimeneznz/eslint-config/commit/7cc8c9f69286557ce98eb5b7fe81104b805734e0))
|
|
81
|
+
|
|
82
|
+
## [5.0.0](https://github.com/danieljimeneznz/eslint-config/compare/v4.0.0...v5.0.0) (2022-06-18)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### ⚠ BREAKING CHANGES
|
|
86
|
+
|
|
87
|
+
* Enforce strong typescript naming conventions, move presets to configs dir (#13)
|
|
88
|
+
|
|
89
|
+
### Features
|
|
90
|
+
|
|
91
|
+
* Enforce strong typescript naming conventions, move presets to configs dir ([#13](https://github.com/danieljimeneznz/eslint-config/issues/13)) ([078af5f](https://github.com/danieljimeneznz/eslint-config/commit/078af5faaa6e6659040547c73292041c59baad35))
|
|
92
|
+
|
|
93
|
+
## [4.0.0](https://github.com/danieljimeneznz/eslint-config/compare/v3.0.1...v4.0.0) (2022-06-16)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
### ⚠ BREAKING CHANGES
|
|
97
|
+
|
|
98
|
+
* Rename eslint-config repo, typescriptService as typescript (#11)
|
|
99
|
+
|
|
100
|
+
### Features
|
|
101
|
+
|
|
102
|
+
* Rename eslint-config repo, typescriptService as typescript ([#11](https://github.com/danieljimeneznz/eslint-config/issues/11)) ([944edb6](https://github.com/danieljimeneznz/eslint-config/commit/944edb61acd3a04c4433596df7477331d57138c2))
|
|
103
|
+
|
|
104
|
+
### [3.0.1](https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v3.0.0...v3.0.1) (2022-05-22)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Bug Fixes
|
|
108
|
+
|
|
109
|
+
* Move prefer-arrow/import plugins from extends to plugin ([#9](https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/issues/9)) ([812687d](https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/commit/812687db7e4b166c3d466bd8df066f1802b14ece))
|
|
110
|
+
|
|
111
|
+
## [3.0.0](https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v2.0.1...v3.0.0) (2022-05-22)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### ⚠ BREAKING CHANGES
|
|
115
|
+
|
|
116
|
+
* Change config name from eslint-config-spoke to eslint-config-danieljimeneznz (#7)
|
|
117
|
+
|
|
118
|
+
### Features
|
|
119
|
+
|
|
120
|
+
* Change config name from eslint-config-spoke to eslint-config-danieljimeneznz ([#7](https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/issues/7)) ([06b3675](https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/commit/06b3675b8f609cc159966ec6e8035568168d4c7b))
|
|
121
|
+
|
|
122
|
+
### [2.0.1](https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v2.0.0...v2.0.1) (2022-05-22)
|
|
123
|
+
|
|
124
|
+
### Bug Fixes
|
|
125
|
+
|
|
126
|
+
- Add release-please for version management, publish to npmjs ([#3](https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/issues/3)) ([40fec4e](https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/commit/40fec4ef78ef74281f764223de959454f990a5b7))
|
|
127
|
+
|
|
128
|
+
## [2.0.0] - 2021-10-16
|
|
129
|
+
|
|
130
|
+
### Changed
|
|
131
|
+
|
|
132
|
+
- Upgrade deps
|
|
133
|
+
- eslint ^7.32.0 → ^8.0.1
|
|
134
|
+
- @typescript-eslint/parser ^4.31.1 → ^5.0.0
|
|
135
|
+
- @typescript-eslint/eslint-plugin ^4.31.1 → ^5.0.0
|
|
136
|
+
|
|
137
|
+
## [1.0.1] - 2021-09-18
|
|
138
|
+
|
|
139
|
+
### Changed
|
|
140
|
+
|
|
141
|
+
- Move to `main` branch naming
|
|
142
|
+
- Upgrade deps
|
|
143
|
+
- eslint ^7.29.0 → ^7.32.0
|
|
144
|
+
- @typescript-eslint/parser ^4.28.1 → ^4.31.1
|
|
145
|
+
- @typescript-eslint/eslint-plugin ^4.28.1 → ^4.31.1
|
|
146
|
+
|
|
147
|
+
## [1.0.0] - 2021-06-28
|
|
148
|
+
|
|
149
|
+
### Changed
|
|
150
|
+
|
|
151
|
+
- Allow "compatible with version" peer dependencies
|
|
152
|
+
- Upgrade deps
|
|
153
|
+
- @typescript-eslint/parser 4.27.0 → 4.28.1
|
|
154
|
+
- @typescript-eslint/eslint-plugin 4.27.0 → 4.28.1
|
|
155
|
+
|
|
156
|
+
### Removed
|
|
157
|
+
|
|
158
|
+
- `babel` & `flow` configs as these are unused
|
|
159
|
+
|
|
160
|
+
## [0.5.0] - 2021-06-18
|
|
161
|
+
|
|
162
|
+
### Changed
|
|
163
|
+
|
|
164
|
+
- Upgrade deps
|
|
165
|
+
- eslint 6.8.0 → 7.29.0
|
|
166
|
+
- eslint-plugin-flowtype 4.5.3 → 5.7.2
|
|
167
|
+
- @typescript-eslint/parser 2.14.0 → 4.27.0
|
|
168
|
+
- @typescript-eslint/eslint-plugin 2.14.0 → 4.27.0
|
|
169
|
+
- Moved package from building using circleci/npmjs to github packages
|
|
170
|
+
|
|
171
|
+
### Removed
|
|
172
|
+
|
|
173
|
+
- `@typescript-eslint/class-name-casing` eslint rule
|
|
174
|
+
|
|
175
|
+
## [0.4.0] - 2020-10-03
|
|
176
|
+
|
|
177
|
+
### Added
|
|
178
|
+
|
|
179
|
+
- ESLint rules. These can be automatically fixed.
|
|
180
|
+
- `brace-style` for if-else try-catch etc
|
|
181
|
+
- `array-bracket-spacing`
|
|
182
|
+
- `space-before-blocks`
|
|
183
|
+
- `space-before-function-paren`
|
|
184
|
+
- `comma-dangle` to enforce dangling commas or multi-line items in objects
|
|
185
|
+
|
|
186
|
+
## [0.3.0] - 2020-07-24
|
|
187
|
+
|
|
188
|
+
### Removed
|
|
189
|
+
|
|
190
|
+
- Dependency on tslint
|
|
191
|
+
- Only the tslint `one-line` rule is not covered by configured eslint defaults.
|
|
192
|
+
|
|
193
|
+
## [0.2.0] - 2020-07-16
|
|
194
|
+
|
|
195
|
+
### Added
|
|
196
|
+
|
|
197
|
+
- `node` Preset
|
|
198
|
+
|
|
199
|
+
## 0.1.0 - 2020-01-06
|
|
200
|
+
|
|
201
|
+
### Added
|
|
202
|
+
|
|
203
|
+
- `babel`, `common`, `flow`, `mocha`, `node` and `typecript` Configs
|
|
204
|
+
- `common`, `flowService` and `typescriptService` Presets
|
|
205
|
+
|
|
206
|
+
[unreleased]: https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v2.0.0...HEAD
|
|
207
|
+
[2.0.0]: https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v1.0.1...v2.0.0
|
|
208
|
+
[1.0.1]: https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v1.0.0...v1.0.1
|
|
209
|
+
[1.0.0]: https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v0.5.0...v1.0.0
|
|
210
|
+
[0.5.0]: https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v0.4.0...v0.5.0
|
|
211
|
+
[0.4.0]: https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v0.3.0...v0.4.0
|
|
212
|
+
[0.3.0]: https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v0.2.0...v0.3.0
|
|
213
|
+
[0.2.0]: https://github.com/danieljimeneznz/eslint-config-danieljimeneznz/compare/v0.1.0...v0.2.0
|
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Spark 64's Eslint Config
|
|
2
|
+
|
|
3
|
+
This package provides Spark 64's .eslintrc.yaml as an extensible [shared config](https://eslint.org/docs/developer-guide/shareable-configs) :sparkles:
|
|
4
|
+
|
|
5
|
+
## Install and Setup
|
|
6
|
+
|
|
7
|
+
Install the library using:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm i -D eslint @elementx-ai/eslint-config
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Create a `.eslintrc.yaml` file in the root of the repo you are working on and extend the preset/config you wish to use
|
|
16
|
+
|
|
17
|
+
e.g. using the `typescript` linting rules (additional rules can be added to this `extends` list)
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
extends:
|
|
21
|
+
- "@elementx-ai/eslint-config/configs/typescript"
|
|
22
|
+
```
|
package/configs/node.js
ADDED
package/index.js
ADDED
package/lib/common.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ["eslint:recommended"],
|
|
3
|
+
env: {
|
|
4
|
+
node: true,
|
|
5
|
+
es6: true,
|
|
6
|
+
mocha: true,
|
|
7
|
+
},
|
|
8
|
+
plugins: ["prefer-arrow", "import"],
|
|
9
|
+
rules: {
|
|
10
|
+
complexity: ["error", 8],
|
|
11
|
+
eqeqeq: ["error", "smart"],
|
|
12
|
+
quotes: ["error", "double", { allowTemplateLiterals: true }],
|
|
13
|
+
camelcase: ["error", { properties: "always", ignoreDestructuring: true }],
|
|
14
|
+
curly: ["error", "all"],
|
|
15
|
+
"linebreak-style": ["error", "unix"],
|
|
16
|
+
"brace-style": ["error", "1tbs"],
|
|
17
|
+
"eol-last": ["error", "always"],
|
|
18
|
+
"space-in-parens": ["error", "never"],
|
|
19
|
+
"no-multi-spaces": ["error"],
|
|
20
|
+
"no-trailing-spaces": ["error"],
|
|
21
|
+
"object-curly-spacing": ["error", "always"],
|
|
22
|
+
"array-bracket-spacing": ["error", "never"],
|
|
23
|
+
"space-before-blocks": ["error"],
|
|
24
|
+
"import/no-default-export": "error",
|
|
25
|
+
"arrow-body-style": ["error", "as-needed"],
|
|
26
|
+
"no-return-await": ["error"],
|
|
27
|
+
"require-await": ["error"],
|
|
28
|
+
"default-case-last": ["error"],
|
|
29
|
+
"no-console": "off",
|
|
30
|
+
"linebreak-style": "off",
|
|
31
|
+
"no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
32
|
+
"comma-spacing": ["error", { before: false, after: true }],
|
|
33
|
+
"generator-star-spacing": ["error", { before: false, after: true }],
|
|
34
|
+
"arrow-spacing": ["error", { before: true, after: true }],
|
|
35
|
+
"keyword-spacing": ["error", { before: true, after: true }],
|
|
36
|
+
indent: [
|
|
37
|
+
"error",
|
|
38
|
+
2,
|
|
39
|
+
{
|
|
40
|
+
SwitchCase: 1,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
semi: ["error", "always"],
|
|
44
|
+
"prefer-const": [
|
|
45
|
+
"error",
|
|
46
|
+
{
|
|
47
|
+
destructuring: "all",
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
"max-lines": [
|
|
51
|
+
"error",
|
|
52
|
+
{
|
|
53
|
+
max: 600,
|
|
54
|
+
skipBlankLines: true,
|
|
55
|
+
skipComments: true,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
"max-len": [
|
|
59
|
+
"error",
|
|
60
|
+
{
|
|
61
|
+
code: 120,
|
|
62
|
+
ignoreComments: true,
|
|
63
|
+
ignoreTrailingComments: true,
|
|
64
|
+
ignoreUrls: true,
|
|
65
|
+
ignoreStrings: true,
|
|
66
|
+
ignoreTemplateLiterals: true,
|
|
67
|
+
ignoreRegExpLiterals: true,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
"space-before-function-paren": [
|
|
71
|
+
"error",
|
|
72
|
+
{
|
|
73
|
+
anonymous: "never",
|
|
74
|
+
named: "never",
|
|
75
|
+
asyncArrow: "always",
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
"comma-dangle": [
|
|
79
|
+
"error",
|
|
80
|
+
{
|
|
81
|
+
arrays: "always-multiline",
|
|
82
|
+
objects: "always-multiline",
|
|
83
|
+
imports: "never",
|
|
84
|
+
exports: "never",
|
|
85
|
+
functions: "never",
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
"prefer-arrow/prefer-arrow-functions": [
|
|
89
|
+
"error",
|
|
90
|
+
{
|
|
91
|
+
disallowPrototype: true,
|
|
92
|
+
singleReturnOnly: false,
|
|
93
|
+
classPropertiesAllowed: false,
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
"prefer-arrow-callback": [
|
|
97
|
+
"error",
|
|
98
|
+
{
|
|
99
|
+
allowNamedFunctions: true,
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
"func-style": [
|
|
103
|
+
"error",
|
|
104
|
+
"expression",
|
|
105
|
+
{
|
|
106
|
+
allowArrowFunctions: true,
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
"import/order": [
|
|
110
|
+
"error",
|
|
111
|
+
{
|
|
112
|
+
"newlines-between": "always",
|
|
113
|
+
groups: [
|
|
114
|
+
"external",
|
|
115
|
+
"builtin",
|
|
116
|
+
"internal",
|
|
117
|
+
"sibling",
|
|
118
|
+
"parent",
|
|
119
|
+
"index",
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: "@typescript-eslint/parser",
|
|
3
|
+
parserOptions: {
|
|
4
|
+
project: "tsconfig.json",
|
|
5
|
+
sourceType: "module",
|
|
6
|
+
},
|
|
7
|
+
plugins: ["@typescript-eslint"],
|
|
8
|
+
rules: {
|
|
9
|
+
"@typescript-eslint/prefer-namespace-keyword": ["error"],
|
|
10
|
+
"@typescript-eslint/no-unused-vars": ["error"],
|
|
11
|
+
"@typescript-eslint/semi": ["error", "always"],
|
|
12
|
+
"@typescript-eslint/type-annotation-spacing": ["error"],
|
|
13
|
+
"@typescript-eslint/indent": [
|
|
14
|
+
"error",
|
|
15
|
+
2,
|
|
16
|
+
{
|
|
17
|
+
SwitchCase: 1,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
"@typescript-eslint/member-delimiter-style": [
|
|
21
|
+
"error",
|
|
22
|
+
{
|
|
23
|
+
multiline: {
|
|
24
|
+
delimiter: "semi",
|
|
25
|
+
requireLast: true,
|
|
26
|
+
},
|
|
27
|
+
singleline: {
|
|
28
|
+
delimiter: "semi",
|
|
29
|
+
requireLast: false,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
"@typescript-eslint/naming-convention": [
|
|
34
|
+
"error",
|
|
35
|
+
{
|
|
36
|
+
selector: ["default"],
|
|
37
|
+
format: ["strictCamelCase"],
|
|
38
|
+
leadingUnderscore: "allow",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
selector: ["typeLike"],
|
|
42
|
+
format: ["StrictPascalCase"],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
selector: ["variable"],
|
|
46
|
+
modifiers: ["const"],
|
|
47
|
+
format: ["strictCamelCase", "UPPER_CASE"],
|
|
48
|
+
leadingUnderscore: "allow",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
selector: ["variable"],
|
|
52
|
+
modifiers: ["destructured"],
|
|
53
|
+
format: ["strictCamelCase", "UPPER_CASE", "snake_case"],
|
|
54
|
+
leadingUnderscore: "allow",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
selector: ["memberLike"],
|
|
58
|
+
modifiers: ["private"],
|
|
59
|
+
format: ["strictCamelCase"],
|
|
60
|
+
leadingUnderscore: "require",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
selector: ["interface"],
|
|
64
|
+
prefix: ["I"],
|
|
65
|
+
format: ["StrictPascalCase"],
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elementx-ai/eslint-config",
|
|
3
|
+
"version": "6.0.0",
|
|
4
|
+
"description": "Spark 64's eslint config",
|
|
5
|
+
"license": "Unlicense",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/spark-64/eslint-config"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/spark-64/eslint-config/issues"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"eslint",
|
|
15
|
+
"eslintconfig"
|
|
16
|
+
],
|
|
17
|
+
"main": "index.js",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@typescript-eslint/parser": "^5.0.0",
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
21
|
+
"eslint-plugin-import": "^2.26.0",
|
|
22
|
+
"eslint-plugin-prefer-arrow": "^1.2.3"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"eslint": "^8.0.1"
|
|
26
|
+
}
|
|
27
|
+
}
|