eslint-config-plus-prettier 1.0.2-alpha-7 → 1.0.2-alpha-8

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 CHANGED
@@ -1,10 +1,21 @@
1
- # aimeerivers-eslint-prettier-config
1
+ # eslint-config-plus-prettier
2
2
 
3
3
  Standard config for ESLint and Prettier
4
4
 
5
5
  ## Install
6
6
 
7
- npm install --save-dev aimeerivers-eslint-prettier-config
7
+ npm install --save-dev eslint-config-plus-prettier
8
+ npx install-peerdeps --dev eslint-config-plus-prettier
9
+
10
+ Add a `.eslintrc.json` file with the following:
11
+
12
+ {
13
+ "extends": "eslint-config-plus-prettier"
14
+ }
15
+
16
+ Add prettier config to `package.json`:
17
+
18
+ "prettier": "eslint-config-plus-prettier/.prettierrc.json"
8
19
 
9
20
  Add the following scripts:
10
21
 
@@ -17,3 +28,6 @@ Add the following scripts:
17
28
 
18
29
  npm run lint
19
30
  npm run format
31
+
32
+ - Linting will check for errors and fix formatting in `.ts` and `.js` files.
33
+ - Formatting will apply format rules to all possible files.
package/index.js CHANGED
@@ -1,41 +1,41 @@
1
1
  module.exports = {
2
2
  root: true,
3
3
  extends: [
4
- "standard-with-typescript",
5
- "plugin:prettier/recommended",
6
- "plugin:@typescript-eslint/recommended"
4
+ 'standard-with-typescript',
5
+ 'plugin:prettier/recommended',
6
+ 'plugin:@typescript-eslint/recommended',
7
7
  ],
8
8
  rules: {
9
- "prefer-const": [
10
- "error",
9
+ 'prefer-const': [
10
+ 'error',
11
11
  {
12
- "destructuring": "any",
13
- "ignoreReadBeforeAssign": false
14
- }
12
+ destructuring: 'any',
13
+ ignoreReadBeforeAssign: false,
14
+ },
15
15
  ],
16
- "unused-imports/no-unused-imports": "error",
17
- "@typescript-eslint/consistent-type-imports": [
18
- "error",
16
+ 'unused-imports/no-unused-imports': 'error',
17
+ '@typescript-eslint/consistent-type-imports': [
18
+ 'error',
19
19
  {
20
- "prefer": "type-imports",
21
- "disallowTypeAnnotations": false
22
- }
20
+ prefer: 'type-imports',
21
+ disallowTypeAnnotations: false,
22
+ },
23
23
  ],
24
- "import/order": [
25
- "error",
24
+ 'import/order': [
25
+ 'error',
26
26
  {
27
- "alphabetize": {
28
- "order": "asc",
29
- "caseInsensitive": true
30
- }
31
- }
27
+ alphabetize: {
28
+ order: 'asc',
29
+ caseInsensitive: true,
30
+ },
31
+ },
32
32
  ],
33
- "sort-imports": ["off"],
34
- "simple-import-sort/imports": "error"
33
+ 'sort-imports': ['off'],
34
+ 'simple-import-sort/imports': 'error',
35
35
  },
36
- plugins: ["simple-import-sort", "unused-imports"],
36
+ plugins: ['simple-import-sort', 'unused-imports'],
37
37
  parserOptions: {
38
- ecmaVersion: "latest",
39
- sourceType: "module"
40
- }
38
+ ecmaVersion: 'latest',
39
+ sourceType: 'module',
40
+ },
41
41
  };
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "eslint-config-plus-prettier",
3
- "version": "1.0.2-alpha-7",
3
+ "version": "1.0.2-alpha-8",
4
4
  "description": "Standard config for ESLint and Prettier",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "index.js",
8
- ".prettierrc.json"
8
+ ".prettierrc.json",
9
+ "tsconfig.json"
9
10
  ],
10
11
  "scripts": {
11
- "test": "echo \"Error: no test specified\" && exit 1"
12
+ "lint": "eslint . --ext .ts,.js --fix",
13
+ "format": "prettier --write ."
12
14
  },
13
15
  "author": "aimee rivers",
14
16
  "license": "ISC",
package/tsconfig.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es6",
4
+ "module": "commonjs",
5
+ "strict": true,
6
+ "esModuleInterop": true,
7
+ "skipLibCheck": true,
8
+ "outDir": "./dist"
9
+ },
10
+ "include": ["./**/*"]
11
+ }