From cbe632d31048be09ffa43bb33a4d651e0cdbc74f Mon Sep 17 00:00:00 2001 From: Kate Sills Date: Tue, 26 Feb 2019 13:31:25 -0800 Subject: [PATCH 1/2] standardize eslint rules --- .eslintrc.js | 7 +++++-- package.json | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2f5f022531..55cb53e178 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,8 +1,7 @@ module.exports = { extends: ['airbnb', 'plugin:prettier/recommended'], env: { - es6: true, - mocha: true, + es6: true, // supports new ES6 globals (e.g., new types such as Set) }, rules: { 'implicit-arrow-linebreak': 'off', @@ -10,5 +9,9 @@ module.exports = { 'arrow-parens': 'off', strict: 'off', 'no-console': 'off', + 'no-unused-vars': ['error', { argsIgnorePattern: '^_' }], + 'no-return-assign': 'off', + 'no-param-reassign': 'off', + 'no-restricted-syntax': ['off', 'ForOfStatement'], }, }; diff --git a/package.json b/package.json index 817fc13d5b..f99e7d39f4 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,9 @@ "module": "index.js", "scripts": { "test": "node test/test.js", - "format": "prettier --write '**/*.{js,jsx}'", - "lint": "eslint '**/*.{js,jsx}'", - "create-cjs": "rollup index.js --file index-commonjs.js --format cjs" + "create-cjs": "rollup index.js --file index-commonjs.js --format cjs", + "lint-fix": "eslint --fix '**/*.{js,jsx}'", + "lint-check": "eslint '**/*.{js,jsx}'" }, "repository": { "type": "git", From e2eb1eb0253046da35292db6d656740b1a12a9cb Mon Sep 17 00:00:00 2001 From: Kate Sills Date: Tue, 26 Feb 2019 13:34:32 -0800 Subject: [PATCH 2/2] fix circleci --- .circleci/config.yml | 2 +- .npmignore | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 04e532796f..d1b8d02a81 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: - ./node_modules - run: name: Lint - command: npm run lint + command: npm run lint-check - run: name: Test command: npm test diff --git a/.npmignore b/.npmignore index c4d9ea4853..09310f5857 100644 --- a/.npmignore +++ b/.npmignore @@ -2,6 +2,6 @@ test # Settings -.travis.yml +.circleci .eslintrc.js .prettierrc.json