@kevinmarrec/eslint-config 0.0.1

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +78 -0
  3. package/index.js +7 -0
  4. package/package.json +26 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022-present Kevin Marrec
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,78 @@
1
+ # @kevinmarrec/eslint-config
2
+
3
+ [![npm version][npm-version-src]][npm-version-href]
4
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
+ [![Github Actions][github-actions-src]][github-actions-href]
6
+
7
+ > Based on [@antfu/eslint-config](https://github.com/antfu/eslint-config) by [Anthony Fu](https://github.com/antfu) :
8
+ > - Single quotes, no semi
9
+ > - Auto fix for formatting (aimed to be used standalone without Prettier)
10
+ > - Designed to work with TypeScript, Vue out-of-box
11
+ > - Lint also for json, yaml, markdown
12
+ > - Sorted imports, dangling commas for cleaner commit diff
13
+ > - Reasonable defaults, best practices, only one-line of config
14
+
15
+ Additionnally, this configuration overrides some rules to match my personal preferences :
16
+
17
+ - `@typescript-eslint/no-unused-vars` : Warning (`warn`) instead of Error (`error`)
18
+ - `@typescript-eslint/space-before-function-paren` : Set to `always` for spaces before function parenthesis
19
+
20
+ ## Usage
21
+
22
+ ### Install
23
+
24
+ ```bash
25
+ pnpm add -D eslint @kevinmarrec/eslint-config
26
+ ```
27
+
28
+ ### Config `.eslintrc`
29
+
30
+ ```json
31
+ {
32
+ "extends": "@kevinmarrec"
33
+ }
34
+ ```
35
+
36
+ ### Add script for package.json
37
+
38
+ For example:
39
+
40
+ ```json
41
+ {
42
+ "scripts": {
43
+ "lint": "eslint .",
44
+ "lint:fix": "eslint . --fix"
45
+ }
46
+ }
47
+ ```
48
+
49
+ ### Config VS Code auto fix
50
+
51
+ Install [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and create `.vscode/settings.json`
52
+
53
+ ```json
54
+ {
55
+ "prettier.enable": false,
56
+ "editor.formatOnSave": false,
57
+ "editor.codeActionsOnSave": {
58
+ "source.fixAll.eslint": true
59
+ }
60
+ }
61
+ ```
62
+
63
+ ## Copyright
64
+
65
+ This configuration is based on [@antfu/eslint-config](https://github.com/antfu/eslint-config) by [Anthony Fu](https://github.com/antfu)
66
+
67
+ ## License
68
+
69
+ Made with ❤️
70
+
71
+ Published under the [MIT License](./LICENSE)
72
+
73
+ [npm-version-src]: https://img.shields.io/npm/v/@kevinmarrec/eslint-config?style=flat-square
74
+ [npm-version-href]: https://npmjs.com/package/@kevinmarrec/eslint-config
75
+ [npm-downloads-src]: https://img.shields.io/npm/dm/@kevinmarrec/eslint-config?style=flat-square
76
+ [npm-downloads-href]: https://npmjs.com/package/@kevinmarrec/eslint-config
77
+ [github-actions-src]: https://img.shields.io/github/workflow/status/kevinmarrec/eslint-config/CI?style=flat-square
78
+ [github-actions-href]: https://github.com/kevinmarrec/eslint-config/actions?query=workflow%3Aci
package/index.js ADDED
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ extends: '@antfu',
3
+ rules: {
4
+ '@typescript-eslint/no-unused-vars': ['warn'],
5
+ '@typescript-eslint/space-before-function-paren': ['error', 'always']
6
+ }
7
+ }
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@kevinmarrec/eslint-config",
3
+ "version": "0.0.1",
4
+ "description": "Kevin's ESLint config",
5
+ "author": "Kevin Marrec <kevin@marrec.io> (https://github.com/kevinmarrec)",
6
+ "license": "MIT",
7
+ "homepage": "https://github.com/kevinmarrec/eslint-config",
8
+ "keywords": [
9
+ "eslint-config"
10
+ ],
11
+ "main": "index.js",
12
+ "files": [
13
+ "index.js"
14
+ ],
15
+ "peerDependencies": {
16
+ "eslint": ">=7.4.0"
17
+ },
18
+ "dependencies": {
19
+ "@antfu/eslint-config": "^0.31.0"
20
+ },
21
+ "devDependencies": {
22
+ "standard-version": "^9.5.0",
23
+ "eslint": "^8.27.0"
24
+ },
25
+ "packageManager": "pnpm@7.17.0"
26
+ }