-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Linting #583
Open
brettz9
wants to merge
7
commits into
jquery-form:master
Choose a base branch
from
brettz9:linting
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Linting #583
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Linting: Add `.eslintignore` file - Linting: Use `overrides` for special treatment of config files - Linting: Remove `no-undefined` rule (not useful in strict mode and with `no-restricted-names` protecting against shadowing; while useful to use `undefined` for explicit array return) - Linting: Comment out `no-invalid-this` (not practical for jQuery) - Linting: Comment out `no-ternary` (really want to disable?) - Linting: Allow `clk_x` and `clk_y` non-camel-cased - Linting (HTML): Add self-closing tag for non-void `<option>`; add DOCTYPE; consistent/fixed quotes - Docs: Remove stray quote in CONTRIBUTING (tripping up syntax highlighting in Atom) - Refactoring/Linting: Throw `Error` object in place of "abort" string - npm: Add `lint `and `test` script - npm: Add `eslint` devDep.
- Refactoring: Avoid further `let`, bringing declaration closer to scope
Any chance you'll be able to take a look? |
Hi--I'd like to possibly make some more substantial contributions, but figure it is safer to build on a well-linted foundation. |
…dep. to earliest npm version 1.9.1 (though `package.json` started in 1.8.0)
Is it possible to integrate this pull request? because it is hard to work on JQuery3 stuff if it is not lint error free!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A large PR as it fixes the linting issues per your current desired config.
Re disabling:
complexity
andmax-statements
rules, though I can undo that if you like.no-continue
, as for longer code,continue
helps prevent overly nested blocks. (Let me know if you prefer to have this rule removed.)no-ternary
as I hope you'd reconsider not enforcing this (just restricting nested ternaries), though I can re-enable that and offer fixes if you are set on that.clk_x
andclk_y
to camel-casing without introducing a breaking change, so I explicitly ignored them in the camel-case rule, but let me know if I can change..eslintignore
file (allows linting IDEs to know what should not be linted)overrides
for special treatment of config filesno-undefined
rule (not useful in strict mode and withno-restricted-names
protecting against shadowing; while useful to useundefined
for explicit array return)no-invalid-this
(not practical for jQuery)no-ternary
(really want to disable?)clk_x
andclk_y
non-camel-cased<option>
; add DOCTYPE; consistent/fixed quotesError
object in place of "abort" stringArray.isArray
, movelet
/const
closer to scopelint
andtest
scripteslint
devDep.engines
to Node 8 (forObject.values
); bump jquery dep. to earliest npm version 1.9.1 (thoughpackage.json
started in 1.8.0)If you need a build step so as to convert
const
tovar
andfor..of
for older browsers, I can look to add Babel to the build steps, though in so doing, and if it's all right, I'd like to:package.json
scripts onlyObject.values
, so for older browsers, that may need a polyfill, depending on what you wanted to do about such, e.g., to refer users tocore-js
if they need these.)Other items I might tackle if you're ok with it:
eslint-config-ash-nazg
for a very robust config (drawing together several plugins in the community).husky
, possibly withlint-staged
to avoid the need for handling installation of shell scripts in the repo (keeping it all nicely Node orpackage.json
command driven).I'm on a very slow connection atm, so not able to download PhantomJS to confirm tests are still passing, but I think if you find any issues, there really shouldn't be many (or I can explain).