Do you want to use ESLint?
- Dominant language
- JavaScript
- Stars
- 453
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
I cloned the repository because I've been meaning to see what's going with class instance properties. (Foolish? Maybe 😐 But in the worst case, I learn something about React internals, Babel plugins, or hot reloading :neckbeard: I call that a win 🥇 ) However, when I opened Atom, it wasn't happy about ESLint not being installed. Since it's a weekend and I'm free to yak shave, I'd like to fix that.
**I'm opening this issue to ask what approach the maintainers prefer.** I can do any combination of the following, ordered according to increasing magnitude of change:
1. Delete the `.eslintrc` file. All done, problem solved.
1. Add `eslint@^0.24.1` and `babel-eslint@^4.1.8` to `devDependencies`.
Based on the contents of the `.eslintrc`, I can tell that it was originally used with a v0.x release of ESLint because it overrides some rules that were enabled by default in the v0.x releases - when we shipped v1.0, we [disabled all rules by default](http://eslint.org/docs/user-guide/migrating-to-1.0.0#all-rules-off-by-default).
https://github.com/gaearon/react-proxy/pull/54 already addressed the editor complaints in the `1.x` branch by adding the missing `devDependencies`, but it installed ESLint v2, which means [`quotes`](http://eslint.org/docs/rules/quotes) is now the only rule enabled in the `1.x` branch in this repository.
1.
Fix 15 existing lint errors in `src/`.
```sh
$ node_modules/.bin/eslint src
src/createClassProxy.js
74:8 error Missing semicolon semi
81:21 error The Function constructor is eval no-new-func
119:8 error existingProxy is already declared in the upper scope no-shadow
121:6 error Expected no return value consistent-return
138:4 error The '__proto__' property is deprecated no-proto
138:31 error The '__proto__' property is deprecated no-proto
226:3 error Unnecessary semicolon no-extra-semi
265:9 error The '__proto__' property is deprecated no-proto
src/createPrototypeProxy.js
111:4 error Expected no return value consistent-return
174:4 error The '__proto__' property is deprecated no-proto
190:1 error Unnecessary semicolon no-extra-semi
src/deleteUnknownAutoBindMethods.js
50:4 error Expected no return value consistent-return
53:4 error Expected no return value consistent-return
src/supportsProtoAssignment.js
4:2 error The '__proto__' property is deprecated no-proto
9:1 error Unnecessary semicolon no-extra-semi
✖ 15 problems (15 errors, 0 warnings)
```
1.
In `tests/`, enable the `mocha` environment, disable `no-unused-vars`, and fix 19 remaining errors.
```sh
test/consistency.js
299:6 error Missing semicolon semi
test/helpers/createShallowRenderer.js
12:38 error Strings must use singlequote quotes
13:35 error Strings must use singlequote quotes
14:31 error Strings must use singlequote quotes
15:34 error Strings must use singlequote quotes
16:27 error Strings must use singlequote quotes
17:41 error Strings must use singlequote quotes
18:21 error Strings must use singlequote quotes
25:3 error "options" is not defined no-undef
119:42 error Missing semicolon semi
test/instance-method-autobinding.js
228:4 error Missing semicolon semi
test/instance-method.js
148:1 error Unnecessary semicolon no-extra-semi
test/legacy-support.js
2:54 error Missing semicolon semi
test/pure-component.js
25:3 error Missing semicolon semi
test/static-descriptor.js
98:17 error Unexpected trailing comma comma-dangle
102:17 error Unexpected trailing comma comma-dangle
test/static-method.js
10:5 error Unnecessary semicolon no-extra-semi
22:5 error Unnecessary semicolon no-extra-semi
114:27 error Unexpected trailing comma comma-dangle
✖ 19 problems (19 errors, 0 warnings)
```
1. Upgrade to a newer version of ESLint, extend `eslint:recommended`, and fix any lint errors.
When we stopped enabling default rules in v1.0, we created [`eslint:recommended`](http://eslint.org/docs/rules/), which omits stylistic rules and enables "you probably didn't mean to do this" rules. Extending `eslint:recommended` would be most similar to the current behavior of using the default rules and disabling a few.
1. Add a `lint` step to the `test` script in `package.json`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.