Skip to content

Commit 346faf7

Browse files
committed
Integrate new ESLint and Prettier config
1 parent 66c5625 commit 346faf7

File tree

4 files changed

+19
-34
lines changed

4 files changed

+19
-34
lines changed

.eslintignore

-5
This file was deleted.

.eslintrc.js

-22
This file was deleted.

package.json

+16-7
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,19 @@
6161
"integration-test-run-basic": "jest --maxWorkers=5 integration-basic",
6262
"integration-test-run-all": "jest --maxWorkers=5 integration-all",
6363
"integration-test-cleanup": "node tests/utils/aws-cleanup.js",
64-
"postinstall": "node ./scripts/postinstall.js"
64+
"postinstall": "node ./scripts/postinstall.js",
65+
"prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",
66+
"prettier-check-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c",
67+
"prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",
68+
"prettify-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write"
6569
},
70+
"eslintConfig": {
71+
"extends": "@serverless/eslint-config/node",
72+
"root": true
73+
},
74+
"eslintIgnore": [
75+
"lib/plugins/create/templates/**"
76+
],
6677
"mocha": {
6778
"reporter": "tests/mocha-reporter",
6879
"timeout": 5000
@@ -77,17 +88,14 @@
7788
"useStderr": true
7889
},
7990
"devDependencies": {
91+
"@serverless/eslint-config": "^1.0.0",
8092
"chai": "^4.2.0",
8193
"chai-as-promised": "^7.1.1",
8294
"child-process-ext": "^2.0.0",
8395
"cli-progress-footer": "^1.1.1",
8496
"coveralls": "^3.0.4",
85-
"eslint": "^3.19.0",
86-
"eslint-config-airbnb": "^10.0.1",
87-
"eslint-config-airbnb-base": "^5.0.3",
88-
"eslint-plugin-import": "^1.16.0",
89-
"eslint-plugin-jsx-a11y": "^2.2.3",
90-
"eslint-plugin-react": "^6.10.3",
97+
"eslint": "^6.0.1",
98+
"eslint-plugin-import": "^2.18.0",
9199
"git-list-updated": "^1.2.0",
92100
"jest-circus": "^24.8.0",
93101
"jest-cli": "^24.8.0",
@@ -96,6 +104,7 @@
96104
"mock-require": "^3.0.3",
97105
"nyc": "^14.1.1",
98106
"p-limit": "^2.2.0",
107+
"prettier": "^1.18.2",
99108
"process-utils": "^2.3.1",
100109
"proxyquire": "^2.1.0",
101110
"sinon": "^7.3.2",

prettier.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict';
2+
3+
module.exports = require('@serverless/eslint-config/prettier.config');

0 commit comments

Comments
 (0)