Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update eslint #23

Merged
merged 5 commits into from
Aug 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ or, if your webpack config file is not in the default location:

This plugin contains all of the rules available in:

* [ESLint](http://eslint.org/): 2.13.1
* [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react): 5.2.2
* [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import): 1.8.0
* [ESLint](http://eslint.org/): 3.3.1
* [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react): 6.1.1
* [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import): 1.13.0

## License

Expand Down
26 changes: 20 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports = {
},
globals: {},
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true
},
ecmaVersion: 6,
sourceType: 'module'
},
Expand Down Expand Up @@ -59,8 +62,6 @@ module.exports = {
'no-invalid-regexp': 1,
// disallow irregular whitespace outside of strings and comments
'no-irregular-whitespace': 1,
// disallow negation of the left operand of an in expression
'no-negated-in-lhs': 1,
// disallow the use of object properties of the global object (Math and
// JSON) as functions
'no-obj-calls': 1,
Expand All @@ -70,13 +71,17 @@ module.exports = {
'no-regex-spaces': 1,
// disallow sparse arrays
'no-sparse-arrays': 1,
// Disallow template literal placeholder syntax in regular strings
'no-template-curly-in-string': 1,
// Avoid code that looks like two expressions but is actually one
'no-unexpected-multiline': 1,
// disallow unreachable statements after a return, throw, continue, or
// break statement
'no-unreachable': 1,
// disallow control flow statements in finally blocks
'no-unsafe-finally': 1,
// disallow negating the left operand of relational operators
'no-unsafe-negation': 1,
// disallow comparisons with the value NaN
'use-isnan': 1,
// Ensure JSDoc comments are valid
Expand Down Expand Up @@ -138,6 +143,8 @@ module.exports = {
// disallow the use of leading or trailing decimal points in numeric
// literals
'no-floating-decimal': 1,
// disallow assignments to native objects or read-only global variables
'no-global-assign': 1,
// disallow the type conversions with shorter notations
'no-implicit-coercion': 1,
// disallow var and named functions in global scope
Expand All @@ -160,8 +167,6 @@ module.exports = {
'no-multi-spaces': 1,
// disallow use of multiline strings
'no-multi-str': 1,
// disallow reassignments of native objects
'no-native-reassign': 1,
// disallow use of new operator for Function object
'no-new-func': 1,
// disallows creating new instances of String,Number, and Boolean
Expand Down Expand Up @@ -303,6 +308,9 @@ module.exports = {
'consistent-this': [1, 'self'],
// enforce newline at the end of file, with no multiple empty lines
'eol-last': 1,
// require or disallow spacing between function identifiers and their
// invocations
'func-call-spacing': 1,
// require function expressions to have a name
'func-names': 1,
// enforce use of function declarations or expressions
Expand Down Expand Up @@ -341,6 +349,8 @@ module.exports = {
'max-statements': 1,
// enforce a maximum number of statements allowed per line
'max-statements-per-line': 0,
// enforce newlines between operands of ternary expressions
'multiline-ternary': 0,
// require a capital letter for constructors
'new-cap': 1,
// disallow the omission of parentheses when invoking a constructor with no
Expand Down Expand Up @@ -389,8 +399,8 @@ module.exports = {
'no-restricted-syntax': 0,
// disallow whitespace before properties
'no-whitespace-before-property': 1,
// disallow space between function identifier and application
'no-spaced-func': 1,
// Disallow tabs in file
'no-tabs': 1,
// disallow the use of ternary operators
'no-ternary': 0,
// disallow trailing whitespace at the end of lines
Expand Down Expand Up @@ -426,6 +436,8 @@ module.exports = {
'semi-spacing': 1,
// require or disallow use of semicolons instead of ASI
semi: [1, 'never'],
// requires object keys to be sorted
'sort-keys': 0,
// sort import declarations within module
'sort-imports': 0,
// sort variables within the same declaration block
Expand Down Expand Up @@ -522,6 +534,8 @@ module.exports = {
// Ensure imported namespaces contain dereferenced properties as they are
// dereferenced
'import/namespace': 1,
// Restrict which files can be imported in a given folder
'import/no-restricted-paths': 0,

//
// Import: Helpful Warnings
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.8.1",
"main": "index.js",
"scripts": {
"find-new-rules": "eslint-find-rules --unused; eslint-find-rules --unused react.js | grep react",
"missing-rules": "eslint-find-rules --unused && eslint-find-rules --no-core --unused react.js",
"test": "eslint ."
},
"repository": {
Expand Down Expand Up @@ -34,15 +34,15 @@
"style linter"
],
"devDependencies": {
"babel-eslint": "^6.0.4",
"eslint": "^2.13.1",
"eslint-find-rules": "^1.10.0",
"eslint-plugin-import": "^1.8.0",
"eslint-plugin-react": "^5.2.2"
"babel-eslint": "^6.1.0",
"eslint": "^3.3.1",
"eslint-find-rules": "^1.13.0",
"eslint-plugin-import": "^1.13.0",
"eslint-plugin-react": "^6.1.1"
},
"peerDependencies": {
"babel-eslint": "^6.0.4",
"eslint": "^2.13.1",
"eslint-plugin-import": "^1.8.0"
"babel-eslint": "^6.1.0",
"eslint": "^3.3.1",
"eslint-plugin-import": "^1.13.0"
}
}
18 changes: 11 additions & 7 deletions react.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module.exports = {
rules: {
// Prevent missing displayName in a React component definition
'react/display-name': 1,
// Forbid certain props on Components
'react/forbid-component-props': 0,
// Forbid certain propTypes
'react/forbid-prop-types': 1,
// Enforce boolean attributes notation in JSX
Expand All @@ -35,6 +37,8 @@ module.exports = {
'react/jsx-max-props-per-line': 0,
// Prevent usage of .bind() and arrow functions in JSX props
'react/jsx-no-bind': 0,
// Prevent comments from being inserted as text nodes
'react/jsx-no-comment-textnodes': 1,
// Prevent duplicate props in JSX
'react/jsx-no-duplicate-props': 1,
// Prevent usage of unwrapped JSX strings
Expand All @@ -53,10 +57,12 @@ module.exports = {
'react/jsx-uses-react': 1,
// Prevent variables used in JSX to be incorrectly marked as unused
'react/jsx-uses-vars': 1,
// Prevent comments from being inserted as text nodes
'react/no-comment-textnodes': 1,
// Prevent missing parentheses around multilines JSX
'react/jsx-wrap-multilines': 1,
// Prevent usage of dangerous JSX properties
'react/no-danger': 1,
// Prevent problem with children and props.dangerouslySetInnerHTML
'react/no-danger-with-children': 0,
// Prevent usage of deprecated methods
'react/no-deprecated': 1,
// Prevent usage of setState in componentDidMount
Expand All @@ -65,6 +71,8 @@ module.exports = {
'react/no-did-update-set-state': 1,
// Prevent direct mutation of this.state
'react/no-direct-mutation-state': 1,
// Prevent usage of findDOMNode
'react/no-find-dom-node': 1,
// Prevent usage of isMounted
'react/no-is-mounted': 1,
// Prevent multiple component definition per file
Expand All @@ -85,8 +93,6 @@ module.exports = {
'react/prop-types': 0,
// Prevent missing React when using JSX
'react/react-in-jsx-scope': 1,
// Restrict file extensions that may be required
'react/require-extension': 1,
// Enforce React components to have a shouldComponentUpdate method
'react/require-optimization': 0,
// Enforce ES5 or ES6 class for returning value in render function
Expand All @@ -100,8 +106,6 @@ module.exports = {
callbacksLast: true,
ignoreCase: true,
requiredFirst: true
}],
// Prevent missing parentheses around multilines JSX
'react/wrap-multilines': 1
}]
}
}