Skip to content

Commit

Permalink
chore: add project field to eslint parser options (#2122)
Browse files Browse the repository at this point in the history
The project field causes eslint to look up the closest tsconfig.json
when linting ts files instead of always going to the root of the
project to find it.

Reverts #2109
Fixes #2095
  • Loading branch information
achingbrain committed Oct 4, 2023
1 parent c88de8e commit 5a6a437
Show file tree
Hide file tree
Showing 40 changed files with 39 additions and 6 deletions.
1 change: 1 addition & 0 deletions doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/auto-relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/connection-encryption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/discovery-mechanisms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/echo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/libp2p-in-the-browser/websockets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/peer-and-content-routing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/pnet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/protocol-and-stream-muxing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions examples/transports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
Expand Down
1 change: 1 addition & 0 deletions packages/interface-compliance-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/interface-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/kad-dht/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
Expand Down
1 change: 1 addition & 0 deletions packages/keychain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/libp2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
Expand Down
1 change: 1 addition & 0 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/metrics-prometheus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/multistream-select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/peer-collections/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/peer-discovery-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/peer-discovery-mdns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/peer-id-factory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
Expand Down
1 change: 1 addition & 0 deletions packages/peer-id/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/peer-record/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
Expand Down
1 change: 1 addition & 0 deletions packages/peer-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
Expand Down
1 change: 1 addition & 0 deletions packages/protocol-perf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/pubsub-floodsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/stream-multiplexer-mplex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/transport-tcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/transport-webrtc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/transport-websockets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/transport-webtransport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down
6 changes: 0 additions & 6 deletions tsconfig.json

This file was deleted.

0 comments on commit 5a6a437

Please sign in to comment.