diff --git a/.eslintrc b/.eslintrc index 0667d9ddb5..b6f0d450fb 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,13 +2,12 @@ "env": { "node": true }, + parserOptions: { + ecmaVersion: 2015 + }, ecmaFeatures: { jsx: true }, - "globals": { - }, - "plugins": [ - ], "rules": { // Possible Errors "comma-dangle": [2, "never"], @@ -149,10 +148,16 @@ "wrap-regex": 0, // Legacy "max-depth": 0, - "max-len": [2, 120], + "max-len": [2, 120, { + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreComments": true, + }], "max-params": 0, "max-statements": 0, "no-plusplus": 0, - "no-prototype-builtins": 2 + "no-prototype-builtins": 2, + "prefer-template": 2, + "template-curly-spacing": [2, "never"] } } diff --git a/.travis.yml b/.travis.yml index 1f6e191125..8e11eaa334 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,7 @@ node_js: - '6' - '5' - '4' - - 'iojs' - - '0.12' - - '0.10' before_script: - - 'if [ "${TRAVIS_NODE_VERSION}" = "iojs" ] || [ "${TRAVIS_NODE_VERSION}" = "0.12" ] || [ "${TRAVIS_NODE_VERSION}" = "0.10" ]; then npm install eslint@2 babel-eslint@6; fi' after_success: - npm run coveralls matrix: diff --git a/docs/rules/forbid-elements.md b/docs/rules/forbid-elements.md index 16c4c62ddd..774385dad1 100644 --- a/docs/rules/forbid-elements.md +++ b/docs/rules/forbid-elements.md @@ -16,12 +16,12 @@ This rule checks all JSX elements and `React.createElement` calls and verifies t ### `forbid` -An array of strings and/or objects. An object in this array may have the following properties: +An array of strings and/or objects. An object in this array may have the following properties: * `element` (required): the name of the forbidden element (e.g. `'button'`, `'Modal'`) * `message`: additional message that gets reported -A string item in the array is a shorthand for `{ element: string }`. +A string item in the array is a shorthand for `{ element: string }`. The following patterns are not considered warnings: @@ -50,7 +50,7 @@ React.createElement(Namespaced.Element); // [1, { "forbid": [{ "element": "button", "message": "use