mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 00:09:48 +02:00
refactor: fix more type-aware linting errors (#7479)
This commit is contained in:
parent
bf1513a3e3
commit
624735bd92
51 changed files with 192 additions and 189 deletions
4
.eslintrc.js
vendored
4
.eslintrc.js
vendored
|
@ -83,7 +83,7 @@ module.exports = {
|
|||
'no-restricted-exports': OFF,
|
||||
'no-restricted-properties': [
|
||||
ERROR,
|
||||
...[
|
||||
.../** @type {[string, string][]} */ ([
|
||||
// TODO: TS doesn't make Boolean a narrowing function yet,
|
||||
// so filter(Boolean) is problematic type-wise
|
||||
// ['compact', 'Array#filter(Boolean)'],
|
||||
|
@ -114,7 +114,7 @@ module.exports = {
|
|||
['take', 'Array#slice(0, n)'],
|
||||
['takeRight', 'Array#slice(-n)'],
|
||||
['tail', 'Array#slice(1)'],
|
||||
].map(([property, alternative]) => ({
|
||||
]).map(([property, alternative]) => ({
|
||||
object: '_',
|
||||
property,
|
||||
message: `Use ${alternative} instead.`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue