Skip to content

Commit

Permalink
Fix get source code (#60)
Browse files Browse the repository at this point in the history
* fix getSourceCode missing

* version bump
  • Loading branch information
Brianzchen authored Jun 16, 2024
1 parent 2c40812 commit 331d394
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [20.x]

steps:
- name: Checkout repository
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"name": "eslint-plugin-ft-flow",
"description": "Flowtype linting rules for ESLint by flow-typed",
"version": "3.0.9",
"version": "3.0.10",
"license": "MIT",
"main": "./dist/index.js",
"repository": {
"type": "git",
"url": "https://github.com/flow-typed/eslint-plugin-ft-flow"
},
"engines": {
"node": ">=12.22.0"
},
"scripts": {
"build:flow": "flow-copy-source --ignore '*.spec.*' src dist",
"build": "rimraf ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files && yarn build:flow",
Expand Down Expand Up @@ -62,7 +59,7 @@
"rimraf": "^3.0.2"
},
"peerDependencies": {
"eslint": "^8.56.0",
"eslint": "^8.56.0 | ^9.0.0",
"hermes-eslint": ">=0.15.0"
},
"keywords": [
Expand Down
1 change: 1 addition & 0 deletions src/rules/noFlowSuppressionsInStrictFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { suppressionTypes } from '../utilities';
const FLOW_STRICT_MATCHER = /^\s*.*@(?:no)?flow\s*strict(?:-local)?\s*.*/u;

const isStrictFlowFile = (context) => context
.getSourceCode()
.getAllComments()
.some((comment) => FLOW_STRICT_MATCHER.test(comment.value));

Expand Down

0 comments on commit 331d394

Please sign in to comment.