Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update ESLint to support newer JS syntax #210

Merged
merged 2 commits into from
Sep 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": 2018, // suppport syntax features (like Object spread operator) up to es2018
"sourceType": "module",
"ecmaFeatures": {
"impliedStrict": true
},
}
},
"env": {
"node": true,
"es6": true,
"es2017": true // suppport globals (like Promise) up to es2017 (es2018 doesn't have new globals)
},
"rules": {
"curly": 2,
Expand All @@ -22,6 +22,6 @@
"dot-notation": 0,
"no-debugger": 2,
"no-undef": 2,
"no-unused-vars": [2, { "args": "none" }],
"no-unused-vars": [2, { "args": "none" }]
}
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
language: node_js
sudo: false
node_js:
- 8
- 10
- 12
- 14
script:
- npm install
- npm run lint
- npm test
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"author": "Bigcommerce",
"license": "BSD-4-Clause",
"scripts": {
"linter": "eslint .",
"test": "npm run linter && lab -v -t 94 --ignore i18n,WebAssembly,SharedArrayBuffer,Atomics,BigUint64Array,BigInt64Array,BigInt,URL,URLSearchParams,TextEncoder,TextDecoder,queueMicrotask,FinalizationRegistry,WeakRef spec",
"lint": "eslint .",
"lint-and-fix": "eslint . --fix",
"test": "lab -v -t 94 --ignore i18n,WebAssembly,SharedArrayBuffer,Atomics,BigUint64Array,BigInt64Array,BigInt,URL,URLSearchParams,TextEncoder,TextDecoder,queueMicrotask,FinalizationRegistry,WeakRef spec",
"coverage": "lab -c -r console -o stdout -r html -o coverage.html spec"
},
"repository": {
Expand All @@ -29,7 +30,7 @@
},
"devDependencies": {
"code": "~4.0.0",
"eslint": "~4.10.0",
"eslint": "^7.8.1",
"lab": "~13.0.1",
"sinon": "~7.5.0"
}
Expand Down