Skip to content

Commit

Permalink
Replace standard with prettier + eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
swansontec committed Sep 25, 2019
1 parent 65fb862 commit 6e7f5e9
Show file tree
Hide file tree
Showing 7 changed files with 1,631 additions and 2,747 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/lib
/node_modules
7 changes: 7 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": ["standard-kit/lint"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
}
}
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
31 changes: 19 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"module": "lib/index.js",
"scripts": {
"build": "rimraf lib && rollup -c",
"lint": "standard '*.js' 'src/**/*.js' 'test/**/*.js'",
"format": "eslint . --fix",
"lint": "eslint .",
"precommit": "npm run lint && npm test",
"prepare": "npm run build",
"pretest": "npm run build",
Expand All @@ -38,17 +39,23 @@
}
},
"devDependencies": {
"@babel/core": "^7.4.3",
"@babel/preset-env": "^7.4.3",
"@babel/core": "^7.6.2",
"@babel/preset-env": "^7.6.2",
"chai": "^4.2.0",
"husky": "^2.3.0",
"mocha": "^5.0.5",
"nyc": "^11.6.0",
"rimraf": "^2.6.3",
"rollup": "^1.9.0",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-filesize": "^6.0.1",
"rollup-plugin-uglify": "^6.0.2",
"standard": "^11.0.1"
"eslint": "^6.4.0",
"eslint-config-standard-kit": "^0.14.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"husky": "^3.0.5",
"mocha": "^6.2.0",
"nyc": "^14.1.1",
"prettier": "^1.18.2",
"rimraf": "^3.0.0",
"rollup": "^1.21.4",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-filesize": "^6.2.0",
"rollup-plugin-uglify": "^6.0.3"
}
}
2 changes: 1 addition & 1 deletion src/codec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function parse (string, encoding, opts = {}) {
for (let i = 0; i < end; ++i) {
// Read one character from the string:
const value = encoding.codes[string[i]]
if (value === void 0) {
if (value === undefined) {
throw new SyntaxError('Invalid character ' + string[i])
}

Expand Down
3 changes: 2 additions & 1 deletion test/tests.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* global describe, it */
/* global describe, it, require */

const { expect } = require('chai')
const {
base16,
Expand Down
Loading

0 comments on commit 6e7f5e9

Please sign in to comment.