diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index ba0ce3d..0000000 --- a/.eslintrc +++ /dev/null @@ -1,18 +0,0 @@ -// Add our overrides as necessary -{ - "extends": "eslint-config-es5", - "rules": { - "one-var": "off", - "object-curly-spacing": [2, "never"], - "no-param-reassign": 0, - "comma-dangle": 0, - "no-confusing-arrow": 0, - "prefer-rest-params": 0, - "no-use-before-define": 0, - "wrap-iife": 0, - "eqeqeq": 0, - "no-proto": 0, - "no-cond-assign": 0, - "func-names": 0 - } -} diff --git a/.gitignore b/.gitignore index 78aaedd..f7f64b0 100644 --- a/.gitignore +++ b/.gitignore @@ -47,7 +47,7 @@ build/Release node_modules .npmrc package-lock.json - +.nyc_output ##### Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion *.iml diff --git a/.npmignore b/.npmignore index 7a2dedc..19e7391 100644 --- a/.npmignore +++ b/.npmignore @@ -12,3 +12,4 @@ /src/ .npmrc package-lock.json +.nyc_output diff --git a/package.json b/package.json index 367bc39..ee8d8ad 100644 --- a/package.json +++ b/package.json @@ -31,16 +31,11 @@ "benchmark": "^2.1.1", "browserify": "^14.4.0", "check-compose": "^5.0.0", - "dependency-check": "^2.5.0", - "eslint": "^3.7.0", - "eslint-config-airbnb-base": "^11.0.0", - "eslint-config-es5": "^0.5.0", - "eslint-plugin-import": "^2.0.1", + "eslint": "^6.4.0", "gzip-size-cli": "^2.1.0", - "istanbul": "^1.1.0-alpha.1", "lodash": "^4.16.1", "mkdirp": "^0.5.1", - "nsp": "^2.1.0", + "nyc": "^14.1.1", "require-all": "^2.2.0", "rimraf": "^2.3.4", "tape": "^4.2.2", @@ -48,23 +43,16 @@ "watch": "^1.0.1" }, "scripts": { - "cov": "npm run cov:clean && npm run cov:generate", - "cov:clean": "rimraf ./coverage/", - "cov:generate": "istanbul cover test", + "cov": "nyc npm run test", "pretest": "npm run build", - "test": "node test && npm run lint", + "test": "node test", "posttest": "node test/benchmark", "browsertest": "mkdirp ./dist/ && browserify ./test/index.js -t [ babelify --presets [ env ] ] > dist/test_bundle.js && cp ./test/index.html ./dist/ && open ./dist/index.html", "clean": "rimraf dist/*", - "lint": "eslint src && eslint test", + "lint": "eslint ./src/ ./test/", "prebuild": "npm run clean", "build": "npm run minify", - "deps": "npm run deps:missing && npm run deps:extra", - "deps:missing": "dependency-check package.json", - "deps:extra": "dependency-check package.json --extra --no-dev --ignore", - "audit": "nsp check", - "precheck": "npm test", - "check": "npm run audit && npm run deps", + "check": "npm run test && npm run lint", "watch": "watch 'clear && npm -s test' test/ src/", "minify": "mkdirp ./dist/ && uglifyjs src/stampit.js -c collapse_vars,evaluate=false,screw_ie8,unsafe,loops=false,keep_fargs=false,pure_getters,unused,dead_code,keep_fnames=[\"'stampit','Stamp'\"] -m --reserved stampit,Stamp -o dist/stampit.min.js", "preversion": "npm run check", @@ -80,5 +68,24 @@ "/dist/stampit.min.js" ] } - ] + ], + "eslintConfig": { + "env": { + "browser": true, + "commonjs": true, + "es6": true, + "node": true + }, + "extends": "eslint:recommended", + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + }, + "parserOptions": { + "ecmaVersion": 2018 + }, + "rules": { + "no-prototype-builtins": 0 + } + } } diff --git a/test/.eslintrc b/test/.eslintrc index 6ffa8a0..c566b9e 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -1,16 +1,5 @@ -// Add our overrides as necessary { - "extends": "airbnb-base", "rules": { - "object-shorthand": 0, - "arrow-body-style": 0, - "func-names": 0, - "newline-per-chained-call": 0, - "no-prototype-builtins": 0, - "import/no-named-as-default-member": 0, - "import/no-extraneous-dependencies": 0, - "comma-dangle": "off", - "object-curly-spacing": "off", - "no-param-reassign": "off" + "no-prototype-builtins": 0 } } diff --git a/test/benchmark/.eslintrc b/test/benchmark/.eslintrc deleted file mode 100644 index 61c4858..0000000 --- a/test/benchmark/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -// Add our overrides as necessary -{ - "rules": { - "global-require": 0, - "strict": 0, - "lines-around-directive": 0, - "class-methods-use-this": 0, - "no-new": 0 - } -}