Skip to content

Commit 331d394

Browse files
authored
Fix get source code (#60)
* fix getSourceCode missing * version bump
1 parent 2c40812 commit 331d394

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
node-version: [16.x, 18.x, 20.x]
16+
node-version: [20.x]
1717

1818
steps:
1919
- name: Checkout repository

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
{
22
"name": "eslint-plugin-ft-flow",
33
"description": "Flowtype linting rules for ESLint by flow-typed",
4-
"version": "3.0.9",
4+
"version": "3.0.10",
55
"license": "MIT",
66
"main": "./dist/index.js",
77
"repository": {
88
"type": "git",
99
"url": "https://github.com/flow-typed/eslint-plugin-ft-flow"
1010
},
11-
"engines": {
12-
"node": ">=12.22.0"
13-
},
1411
"scripts": {
1512
"build:flow": "flow-copy-source --ignore '*.spec.*' src dist",
1613
"build": "rimraf ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files && yarn build:flow",
@@ -62,7 +59,7 @@
6259
"rimraf": "^3.0.2"
6360
},
6461
"peerDependencies": {
65-
"eslint": "^8.56.0",
62+
"eslint": "^8.56.0 | ^9.0.0",
6663
"hermes-eslint": ">=0.15.0"
6764
},
6865
"keywords": [

src/rules/noFlowSuppressionsInStrictFiles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { suppressionTypes } from '../utilities';
77
const FLOW_STRICT_MATCHER = /^\s*.*@(?:no)?flow\s*strict(?:-local)?\s*.*/u;
88

99
const isStrictFlowFile = (context) => context
10+
.getSourceCode()
1011
.getAllComments()
1112
.some((comment) => FLOW_STRICT_MATCHER.test(comment.value));
1213

0 commit comments

Comments
 (0)