eslint-config-plus-prettier 1.0.2-alpha-6
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/.prettierrc.json +8 -0
- package/README.md +19 -0
- package/index.js +40 -0
- package/package.json +29 -0
package/.prettierrc.json
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# aimeerivers-eslint-prettier-config
|
|
2
|
+
|
|
3
|
+
Standard config for ESLint and Prettier
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
npm install --save-dev aimeerivers-eslint-prettier-config
|
|
8
|
+
|
|
9
|
+
Add the following scripts:
|
|
10
|
+
|
|
11
|
+
"scripts": {
|
|
12
|
+
"lint": "eslint . --ext .ts,.js --fix",
|
|
13
|
+
"format": "prettier --write ."
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
## Use
|
|
17
|
+
|
|
18
|
+
npm run lint
|
|
19
|
+
npm run format
|
package/index.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
"standard-with-typescript",
|
|
4
|
+
"plugin:prettier/recommended",
|
|
5
|
+
"plugin:@typescript-eslint/recommended"
|
|
6
|
+
],
|
|
7
|
+
rules: {
|
|
8
|
+
"prefer-const": [
|
|
9
|
+
"error",
|
|
10
|
+
{
|
|
11
|
+
"destructuring": "any",
|
|
12
|
+
"ignoreReadBeforeAssign": false
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"unused-imports/no-unused-imports": "error",
|
|
16
|
+
"@typescript-eslint/consistent-type-imports": [
|
|
17
|
+
"error",
|
|
18
|
+
{
|
|
19
|
+
"prefer": "type-imports",
|
|
20
|
+
"disallowTypeAnnotations": false
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"import/order": [
|
|
24
|
+
"error",
|
|
25
|
+
{
|
|
26
|
+
"alphabetize": {
|
|
27
|
+
"order": "asc",
|
|
28
|
+
"caseInsensitive": true
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"sort-imports": ["off"],
|
|
33
|
+
"simple-import-sort/imports": "error"
|
|
34
|
+
},
|
|
35
|
+
plugins: ["simple-import-sort", "unused-imports"],
|
|
36
|
+
parserOptions: {
|
|
37
|
+
ecmaVersion: "latest",
|
|
38
|
+
sourceType: "module"
|
|
39
|
+
}
|
|
40
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eslint-config-plus-prettier",
|
|
3
|
+
"version": "1.0.2-alpha-6",
|
|
4
|
+
"description": "Standard config for ESLint and Prettier",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"index.js",
|
|
8
|
+
".prettierrc.json"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
12
|
+
},
|
|
13
|
+
"author": "aimee rivers",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
17
|
+
"@typescript-eslint/parser": "^6.14.0",
|
|
18
|
+
"eslint": "^8.56.0",
|
|
19
|
+
"eslint-config-prettier": "^9.1.0",
|
|
20
|
+
"eslint-config-standard-with-typescript": "^43.0.0",
|
|
21
|
+
"eslint-plugin-import": "^2.29.1",
|
|
22
|
+
"eslint-plugin-n": "^16.4.0",
|
|
23
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
24
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
25
|
+
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
26
|
+
"eslint-plugin-unused-imports": "^3.0.0",
|
|
27
|
+
"prettier": "^3.1.1"
|
|
28
|
+
}
|
|
29
|
+
}
|