diff --git a/.eslintrc b/.eslintrc index 0667d9ddb5..80071df298 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"], @@ -62,7 +61,7 @@ "no-lone-blocks": 2, "no-loop-func": 2, "no-multi-spaces": 2, - "no-multi-str": 0, + "no-multi-str": 2, "no-native-reassign": 2, "no-new": 2, "no-new-func": 2, @@ -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..7ec63cc2fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,11 @@ +sudo: false language: node_js node_js: - '7' - '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/appveyor.yml b/appveyor.yml index d493bb56e4..b5a80ad3fa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,6 +3,7 @@ environment: - nodejs_version: '4' - nodejs_version: '5' - nodejs_version: '6' + - nodejs_version: '7' install: - ps: Install-Product node $env:nodejs_version - set CI=true diff --git a/docs/rules/forbid-elements.md b/docs/rules/forbid-elements.md index 9be67e56ed..951d990205 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