Closed kyleramirez closed 4 months ago
@kyleramirez Thanks for this, this is a huge help, and thanks for the testing walkthrough notes too.
fetch
ed the branchgit checkout
yarn
to install dependenciesprettier
ā
import { Outlet } from "react-router-dom";
to single quotes ('react-router-dom'
)git commit
runs prettier
and changes the quotes back to double ones!recess-order
ā
style.scss
with "out-of-order" properties, and import
in a random React component.git commit
runs the plugin and reorders the CSS properties!eslint
ā
const
variables, but yarn precommit
passed it.class A {}
A = 0;
git commit
catches the errors in my second attempt! Unless I'm missing something, I think this is pretty good to go. Will merge this soon.
I do have one question before then @kyleramirez:
I can't tell from package.json
if the pre-commit hook is also linting TypeScript with tsc
. If not, would that be a good thing to throw into this PR, or another small one?
I can't tell from
package.json
if the pre-commit hook is also linting TypeScript withtsc
. If not, would that be a good thing to throw into this PR, or another small one?
@noi5e , the TypeScript linting is indeed supported with this part of the package json:
"*.{ts,tsx}": [
"yarn run lint-command --fix",
"yarn run prettier --write"
]
It will call lint-command
on each changed file automatically:
eslint --ext ts,tsx --report-unused-disable-directives --max-warnings 0
All right, sounds good, thanks @kyleramirez! Merging now.
Summary
This includes work described in #8.
Testing Notes
yarn
to install all dependencies.tsx
file.git add -A
,yarn run precommit
. Verify that the file was run on the linter and was auto-corrected.tsx
file..tsx
filegit add -A
andgit commit
.scss
file and write some generic CSS attributes.git add -A
,yarn run precommit
. Verify that the file was run on the linter and was auto-corrected for proper CSS attribute orderCaveats / Concerns
latest Chrome version
. This means basically any CSS is supported. We may want to adjust this setting if we want to support more browsers officially