diff --git a/.eslintignore b/.eslintignore index 9f872caac..8600a9e70 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,49 @@ -_book/ -build/ -node_modules/ -**/node_modules/ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git +node_modules + +# Jetbrains IDEs +.idea + +/build +_book + +# Only apps should have lockfiles +npm-shrinkwrap.json +package-lock.json +yarn.lock + +.DS_Store +._.DS_Store + +packages/*/build/ + +# Temporarily copied +packages/*/LICENSE.md +packages/enzyme/README.md +packages/enzyme-adapter-react-*/README.md +packages/enzyme-adapter-utils*/README.md diff --git a/.eslintrc b/.eslintrc index e30a4989f..f81872947 100644 --- a/.eslintrc +++ b/.eslintrc @@ -6,7 +6,6 @@ "mocha": true }, "rules": { - "react/jsx-one-expression-per-line": 0, // TODO: re-enable once fixed "id-length": 0, "new-cap": [2, { "capIsNewExceptions": ["AND"] }], "react/jsx-pascal-case": [2, { "allowAllCaps": true }], @@ -28,5 +27,31 @@ "_stringText", ], }], - } + }, + "overrides": [ + { + "files": [ + "*.md", + //"**/*.md", + ], + "plugins": [ + "markdown" + ], + "rules": { + "class-methods-use-this": 0, + "import/no-unresolved": 0, + "import/no-extraneous-dependencies": 0, + "import/extensions": 0, + "max-len": 0, + "no-unused-vars": 0, + "no-console": 0, + "no-undef": 0, + "react/react-in-jsx-scope": 0, + "react/jsx-filename-extension": 0, + "react/jsx-no-undef": 0, + "react/no-multi-comp": 0, + "react/jsx-one-expression-per-line": 0, + }, + } + ], } diff --git a/.eslintrc-markdown b/.eslintrc-markdown deleted file mode 100644 index a05474124..000000000 --- a/.eslintrc-markdown +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./.eslintrc", - "root": true, - "plugins": [ - "markdown" - ], - "rules": { - "class-methods-use-this": 0, - "import/no-unresolved": 0, - "import/no-extraneous-dependencies": 0, - "import/extensions": 0, - "max-len": 0, - "no-unused-vars": 0, - "no-console": 0, - "no-undef": 0, - "react/react-in-jsx-scope": 0, - "react/jsx-filename-extension": 0, - "react/jsx-no-undef": 0, - "react/no-multi-comp": 0, - }, -} diff --git a/package.json b/package.json index 0415b5f7d..1c5943fe7 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "postversion": "git push && git push --tags && npm run clean && npm run docs:publish", "version": "lerna run build", "clean": "lerna run clean", + "prelint": "npm run docs:lint", "lint": "lerna exec --parallel 'npm run lint -- --quiet'", - "postlint": "npm run docs:lint", "check": "lerna run lint && npm run test:all", "prebuild": "npm run clean", "build": "lerna run build", @@ -38,7 +38,7 @@ "react:16": "npm run env -- 16", "env": "babel-node ./env.js", "docs:clean": "rimraf _book", - "docs:lint": "eslint --ext md --config .eslintrc-markdown --ignore-path .eslintignore .", + "docs:lint": "eslint --ext md --ignore-path .eslintignore .", "docs:prepare": "gitbook install", "docs:build": "npm run docs:prepare && gitbook build", "docs:watch": "npm run docs:prepare && gitbook serve", @@ -76,12 +76,12 @@ "babel-register": "^6.26.0", "chai": "^4.1.2", "coveralls": "^2.13.3", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", "eslint-plugin-markdown": "^1.0.0-beta.7", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "gitbook-cli": "^1.0.1", "gitbook-plugin-anchors": "^0.7.1", "gitbook-plugin-codeblock-disable-glossary": "0.0.1", diff --git a/packages/enzyme-adapter-react-13/package.json b/packages/enzyme-adapter-react-13/package.json index 398be4f3e..a2adb59b7 100644 --- a/packages/enzyme-adapter-react-13/package.json +++ b/packages/enzyme-adapter-react-13/package.json @@ -48,11 +48,11 @@ "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", "enzyme": "^3.0.0", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "rimraf": "^2.6.2", "safe-publish-latest": "^1.1.2" diff --git a/packages/enzyme-adapter-react-14/package.json b/packages/enzyme-adapter-react-14/package.json index 873ccde20..5078d242a 100644 --- a/packages/enzyme-adapter-react-14/package.json +++ b/packages/enzyme-adapter-react-14/package.json @@ -51,11 +51,11 @@ "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", "enzyme": "^3.0.0", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "rimraf": "^2.6.2", "safe-publish-latest": "^1.1.2" diff --git a/packages/enzyme-adapter-react-15.4/package.json b/packages/enzyme-adapter-react-15.4/package.json index a05b3db05..8b8f96b9d 100644 --- a/packages/enzyme-adapter-react-15.4/package.json +++ b/packages/enzyme-adapter-react-15.4/package.json @@ -52,11 +52,11 @@ "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", "enzyme": "^3.0.0", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "rimraf": "^2.6.2", "safe-publish-latest": "^1.1.2" diff --git a/packages/enzyme-adapter-react-15/package.json b/packages/enzyme-adapter-react-15/package.json index e7b03b8bb..4dc162381 100644 --- a/packages/enzyme-adapter-react-15/package.json +++ b/packages/enzyme-adapter-react-15/package.json @@ -51,11 +51,11 @@ "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", "enzyme": "^3.0.0", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "rimraf": "^2.6.2", "safe-publish-latest": "^1.1.2" diff --git a/packages/enzyme-adapter-react-16.1/package.json b/packages/enzyme-adapter-react-16.1/package.json index 3c26339fd..570dcea00 100644 --- a/packages/enzyme-adapter-react-16.1/package.json +++ b/packages/enzyme-adapter-react-16.1/package.json @@ -51,11 +51,11 @@ "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", "enzyme": "^3.0.0", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "rimraf": "^2.6.2", "safe-publish-latest": "^1.1.2" diff --git a/packages/enzyme-adapter-react-16.2/package.json b/packages/enzyme-adapter-react-16.2/package.json index 0cee4a59f..bcb8f65a6 100644 --- a/packages/enzyme-adapter-react-16.2/package.json +++ b/packages/enzyme-adapter-react-16.2/package.json @@ -52,11 +52,11 @@ "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", "enzyme": "^3.0.0", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "rimraf": "^2.6.2", "safe-publish-latest": "^1.1.2" diff --git a/packages/enzyme-adapter-react-16.3/package.json b/packages/enzyme-adapter-react-16.3/package.json index 2d52dd1db..3b213455f 100644 --- a/packages/enzyme-adapter-react-16.3/package.json +++ b/packages/enzyme-adapter-react-16.3/package.json @@ -53,11 +53,11 @@ "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", "enzyme": "^3.0.0", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "rimraf": "^2.6.2", "safe-publish-latest": "^1.1.2" diff --git a/packages/enzyme-adapter-react-16/package.json b/packages/enzyme-adapter-react-16/package.json index 708f3f986..8994ca7be 100644 --- a/packages/enzyme-adapter-react-16/package.json +++ b/packages/enzyme-adapter-react-16/package.json @@ -53,11 +53,11 @@ "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", "enzyme": "^3.0.0", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "rimraf": "^2.6.2", "safe-publish-latest": "^1.1.2" diff --git a/packages/enzyme-adapter-react-helper/package.json b/packages/enzyme-adapter-react-helper/package.json index 52d3e682f..d6f64cb80 100644 --- a/packages/enzyme-adapter-react-helper/package.json +++ b/packages/enzyme-adapter-react-helper/package.json @@ -42,11 +42,11 @@ "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", "enzyme": "^3.0.0", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "react": "0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0 || ^16.3.0-0 || ^16.4.0-0", "safe-publish-latest": "^1.1.2" diff --git a/packages/enzyme-adapter-utils/package.json b/packages/enzyme-adapter-utils/package.json index 2029b45a2..81acdbdee 100644 --- a/packages/enzyme-adapter-utils/package.json +++ b/packages/enzyme-adapter-utils/package.json @@ -45,11 +45,11 @@ "babel-cli": "^6.26.0", "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "rimraf": "^2.6.2", "safe-publish-latest": "^1.1.2" diff --git a/packages/enzyme-example-mocha/package.json b/packages/enzyme-example-mocha/package.json index 6917698f3..e354f0aa7 100644 --- a/packages/enzyme-example-mocha/package.json +++ b/packages/enzyme-example-mocha/package.json @@ -19,11 +19,11 @@ "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", "babel-register": "^6.26.0", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "jsdom": "^11.5.1", "mocha": "^3.5.3", diff --git a/packages/enzyme-test-suite/.eslintrc b/packages/enzyme-test-suite/.eslintrc index 184e7372c..f149733cb 100644 --- a/packages/enzyme-test-suite/.eslintrc +++ b/packages/enzyme-test-suite/.eslintrc @@ -22,6 +22,7 @@ "jsx-a11y/anchor-has-content": 0, "jsx-a11y/anchor-is-valid": 0, "jsx-a11y/label-has-for": 0, + "jsx-a11y/label-has-associated-control": 0, "react/jsx-curly-brace-presence": 0, "react/no-danger": 1, "react/jsx-one-expression-per-line": 0, diff --git a/packages/enzyme-test-suite/package.json b/packages/enzyme-test-suite/package.json index 9175c2a24..885d696fe 100644 --- a/packages/enzyme-test-suite/package.json +++ b/packages/enzyme-test-suite/package.json @@ -45,10 +45,10 @@ }, "devDependencies": { "create-react-class": "^15.6.3", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0" + "eslint-plugin-react": "^7.11.1" } } diff --git a/packages/enzyme/.eslintrc b/packages/enzyme/.eslintrc index 37573d653..d639d726a 100644 --- a/packages/enzyme/.eslintrc +++ b/packages/enzyme/.eslintrc @@ -6,7 +6,6 @@ "mocha": true }, "rules": { - "react/destructuring-assignment": 1, // TODO: re-enable once it detects components "id-length": 0, "new-cap": [2, { "capIsNewExceptions": ["AND"] }], "react/jsx-pascal-case": [2, { "allowAllCaps": true }], diff --git a/packages/enzyme/package.json b/packages/enzyme/package.json index 964cfc77a..71a21368f 100644 --- a/packages/enzyme/package.json +++ b/packages/enzyme/package.json @@ -56,11 +56,11 @@ "babel-cli": "^6.26.0", "babel-plugin-transform-replace-object-assign": "^1.0.0", "babel-preset-airbnb": "^2.5.3", - "eslint": "^4.19.1", - "eslint-config-airbnb": "^17.0.0", - "eslint-plugin-import": "^2.13.0", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1", - "eslint-plugin-react": "^7.10.0", + "eslint-plugin-react": "^7.11.1", "in-publish": "^2.0.0", "jsdom": "^6.5.1", "rimraf": "^2.6.2",