-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[internal] Lint typescript, json, new eslint rules #4449
Conversation
.eslintrc
Outdated
"arrow-body-style": [ | ||
"error", | ||
"always" | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatted with default vscode JSON formatter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add a new scripts/eslint-verify-and-fix.js
and hook it into circle and npm
that both verifies and attempts to --fix
.
What this is solving is situations where our base .eslintrc
rules change - but then on forked PR's that have diverge - those get "missed".
We want to error during the linting stage, but we also want to provide a really good error message telling the author exactly what went wrong and how to fix it locally and push changes.
IDEA: rather than let the user do this, we could alternatively just use a cypress-bot
to automatically push these fixes if we're on a PR.
Other areas worth exploring...
Worth verifying...
|
Also let's...
|
@bkucera can we disable sourcemaps when building cypress for prod - per our last discussion? That way the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is accidentally(?) reverting work done in develop
such as changes to the cli/schema/cypress.schema.json
found here: https://github.com/cypress-io/cypress/pull/4449/files#diff-4e080e63eb738f2552ed87596970c631
The PR went in a few days ago here: #4300
Why is this happening? What other PR's is this PR overriding?
@brian-mann my mistake. when i went to re-lint all the files, I git reset to origin/develop without merging it first, then assumed the json files were up to date with develop. Fixed now |
wow, appveyor.yml thought i was trying to background a process with the '&' in my commit message. |
Released in |
Part of #2690
the best way to view this PR diff is this filter: https://github.com/cypress-io/cypress/pull/4449/files?file-filters%5B%5D=.json&file-filters%5B%5D=.md&file-filters%5B%5D=.yml&file-filters%5B%5D=dotfile&owned-by%5B%5D=
everything besides that is result of linting
motivation:
with typescript coming in, we need a way to lint it locally, in editor, and in ci. I wanted to use keep using eslint --fix, so we use
@ typescript-eslint
changes:
.eslintignore
that covers entire monorepo. This is good for editor integration (you'll get red squiggles when you need them, and won't when you don't) and running oneeslint
command from the rootlint
commands as the root now lints everything recursively (not the case forcoffeelint
since it has no ignore file)prettier
andtslint
(expect forcli/types
which requires tslint fordtslint
)lint-staged
properly to auto-fix partially staged filestasks:
remove duplicate rules from
.eslintrc
that are incypress-dev/general
eslint rulesmerge blankline after multiline expression eslint-plugin-dev#10 to modify eslint rule, release new version
update source files with lint changes from blankline after multiline expression eslint-plugin-dev#10
use
@cypress/eslint-plugin-json
to enfore json style across projectlint all json
rename cypress-dev eslint plugin to
@cypress/dev
add rule for allowing implicit braces only if oneline
wait for new version of @cypress/eslint-plugin-dev to release
add .vscode workspace settings for easier vscode setup