rsnext/docs/basic-features
minervabot a17807246f
Update lint-staged example to use node.js path (#30510)
The current example attempts to remove resolve the relative pathname of the absolute pathnames given by `lint-staged` using string manipulation and `process.cwd()`. This is a risky solution because pathnames have many platform dependent edge cases. The example also returns pathnames that are technically wrong in linux. `/home/project/file => /file`,

I propose to use the utilities provided by node.js to resolve the relative pathnames, and to format the sample `.lintstagedrc.js` file in a manner easier for novice programmers to understand and modify.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-01-01 17:35:28 +00:00
..
built-in-css-support.md docs: fix typo in css-in-js page (#31244) 2021-11-10 15:45:20 +00:00
data-fetching.md Document basePath redirect field for getStaticProps/getServerSideProps (#32550) 2021-12-16 09:54:40 +01:00
environment-variables.md Update environment-variables.md (#31525) 2021-11-17 17:01:42 +00:00
eslint.md Update lint-staged example to use node.js path (#30510) 2022-01-01 17:35:28 +00:00
fast-refresh.md Update fast-refresh.md (#18047) 2020-11-16 22:46:43 +00:00
font-optimization.md docs: update font-optimization.md (#28397) 2021-08-23 16:07:54 +00:00
image-optimization.md Update image-optimization.md (#31401) 2021-11-14 23:13:16 +00:00
layouts.md [docs] Added per page layout example with TypeScript (#27488) 2021-07-30 16:30:32 +00:00
pages.md Add more examples of static generation to docs page. (#29052) 2021-09-13 13:18:31 +00:00
script.md Include mention of the onError Prop for next/script (#31945) 2021-12-15 22:38:01 -06:00
static-file-serving.md Update err.sh links to use nextjs.org/docs/messages instead (#23353) 2021-03-29 10:25:00 +02:00
supported-browsers-features.md Update supported-browsers-features.md (#28326) 2021-08-20 11:52:20 +00:00
typescript.md Fix minor typos (#31161) 2021-11-08 11:24:53 -06:00