@elenajs/eslint-config 0.2.0 → 1.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/README.md +56 -0
- package/package.json +10 -2
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://elenajs.com/img/elena-dark.png" alt="Elena" width="558" height="220">
|
|
4
|
+
</source>
|
|
5
|
+
<source media="(prefers-color-scheme: light)" srcset="https://elenajs.com/img/elena-light.png" alt="Elena" width="558" height="220">
|
|
6
|
+
</source>
|
|
7
|
+
<img src="https://elenajs.com/img/elena-light.png" alt="Elena" width="558" height="220">
|
|
8
|
+
</picture>
|
|
9
|
+
|
|
10
|
+
### Shared ESLint config for Elena projects.
|
|
11
|
+
|
|
12
|
+
<br/>
|
|
13
|
+
|
|
14
|
+
<a href="https://arielsalminen.com"><img src="https://img.shields.io/badge/creator-@arielle-F95B1F" alt="Creator @arielle"/></a>
|
|
15
|
+
<a href="https://www.npmjs.com/package/@elenajs/eslint-config"><img src="https://img.shields.io/npm/v/@elenajs/eslint-config.svg" alt="Latest version on npm" /></a>
|
|
16
|
+
<a href="https://github.com/getelena/elena/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-yellow.svg" alt="Elena is released under the MIT license." /></a>
|
|
17
|
+
<a href="https://github.com/getelena/elena/actions/workflows/tests.yml"><img src="https://github.com/getelena/elena/actions/workflows/tests.yml/badge.svg" alt="Tests status" /></a>
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<br/>
|
|
22
|
+
|
|
23
|
+
<p align="center"><strong>@elenajs/eslint-config</strong> is the shared <a href="https://eslint.org">ESLint</a> config used across Elena packages. It enforces consistent code style with lenient TypeScript rules suited for JavaScript-first projects.</p>
|
|
24
|
+
|
|
25
|
+
<br/>
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install --save-dev @elenajs/eslint-config eslint
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
In your `eslint.config.js`:
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
import elenaConfig from "@elenajs/eslint-config";
|
|
39
|
+
|
|
40
|
+
export default [...elenaConfig];
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## What it includes
|
|
44
|
+
|
|
45
|
+
- Requires braces for all control flow (`curly: ["error", "all"]`), single-line `if` bodies without braces are not allowed.
|
|
46
|
+
- Trailing commas allowed in multiline expressions (`comma-dangle: "only-multiline"`).
|
|
47
|
+
- Lenient TypeScript rules, most `@typescript-eslint/*` strictness rules are turned off for JS-first projects.
|
|
48
|
+
- Ignores `node_modules/`, `dist/`, `test/`, and `coverage/` by default.
|
|
49
|
+
|
|
50
|
+
## Peer Dependencies
|
|
51
|
+
|
|
52
|
+
- `eslint >= 9.0.0`
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elenajs/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "ESLint config for Elena projects.",
|
|
5
5
|
"author": "Elena <hi@elenajs.com>",
|
|
6
6
|
"homepage": "https://elenajs.com/",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/getelena/elena.git",
|
|
10
|
+
"directory": "packages/eslint-config"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/getelena/elena/issues"
|
|
14
|
+
},
|
|
7
15
|
"license": "MIT",
|
|
8
16
|
"exports": "./index.js",
|
|
9
17
|
"files": [
|
|
@@ -15,5 +23,5 @@
|
|
|
15
23
|
"publishConfig": {
|
|
16
24
|
"access": "public"
|
|
17
25
|
},
|
|
18
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "66d1e66dd467c20d7c5c70ffcb5678c6a2694690"
|
|
19
27
|
}
|