Skip to content

Commit e22f6ed

Browse files
committed
style: run oxfmt on README.md
1 parent 37e8e1a commit e22f6ed

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@
395395
If you were using the shell option to avoid passing filenames to tasks, for example `bash -c 'tsc --noEmit'`, use the function syntax instead:
396396

397397
```js
398-
export default { "*.ts": () => "tsc --noEmit" };
398+
export default { '*.ts': () => 'tsc --noEmit' }
399399
```
400400

401401
- [#1546](https://github.com/lint-staged/lint-staged/pull/1546) [`158d15c`](https://github.com/lint-staged/lint-staged/commit/158d15c9aea0a3a87790ec3766442763cf387dba) Thanks [@iiroj](https://github.com/iiroj)! - Validation for deprecated advanced configuration has been removed. The advanced configuration was removed in _lint-staged_ version 9 and until now validation has failed if advanced configuration options were detected. Going forward the entire configuration will be treated with the same logic and if these advanced options are still present, they might be treated as valid globs for staged files instead.
@@ -408,13 +408,13 @@
408408

409409
```js
410410
export default {
411-
"*.js": {
412-
title: "My task",
411+
'*.js': {
412+
title: 'My task',
413413
task: async (files) => {
414-
console.log("Staged JS files:", files);
414+
console.log('Staged JS files:', files)
415415
},
416416
},
417-
};
417+
}
418418
```
419419

420420
_Lint-staged_ will run your function task with the staged files matching the configured glob as its argument, and show the custom title in its console output.
@@ -446,15 +446,13 @@
446446
By default Prettier [prefers double quotes](https://prettier.io/docs/rationale#strings).
447447

448448
#### Previously
449-
450449
1. Stage `file.js` with only double quotes `"` changed to `'`
451450
1. Run `git commit -am "I don't like double quotes"`
452451
1. _Lint-staged_ runs `prettier --write file.js`, converting all the `'` back to `"`
453452
1. Because there are now no changes, _lint-staged_ fails, cancels the commit, and resets back to the original state
454453
1. Commit was not done, original state is restored and single quotes `'` are staged
455454

456455
#### Now
457-
458456
1. Stage `file.js` with only double-quotes `"` changed to `'`
459457
1. Run `git commit -am "I don't like double quotes"`
460458
1. _Lint-staged_ runs `prettier --write file.js`, converting all the `'` back to `"`
@@ -493,8 +491,8 @@
493491
* @type {import('lint-staged').Configuration}
494492
*/
495493
export default {
496-
"*": "prettier --write",
497-
};
494+
'*': 'prettier --write',
495+
}
498496
```
499497

500498
It's also possible to use the `.ts` file extension for the configuration if your Node.js version supports it. The `--experimental-strip-types` flag was introduced in [Node.js v22.6.0](https://github.com/nodejs/node/releases/tag/v22.6.0) and unflagged in [v23.6.0](https://github.com/nodejs/node/releases/tag/v23.6.0), enabling Node.js to execute TypeScript files without additional configuration.
@@ -986,7 +984,7 @@ To update your Node.js integration, please use:
986984

987985
```js
988986
// const lintStaged = require('lint-staged')
989-
import lintStaged from "lint-staged";
987+
import lintStaged from 'lint-staged'
990988
```
991989

992990
## [v11.3.0-beta.2](https://github.com/lint-staged/lint-staged/releases/tag/v11.3.0-beta.2) - 30 Oct 2021

0 commit comments

Comments
 (0)