From b562e18884bfdac77305897157b7341ddf323cce Mon Sep 17 00:00:00 2001 From: Tibor Blenessy Date: Fri, 29 Nov 2024 10:34:10 +0100 Subject: [PATCH] Update README rule counts --- README.md | 2 +- package.json | 2 +- tools/count-rules.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 34420661dad..798f2bd42b8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This repository now hosts [eslint-plugin-sonarjs](./packages/jsts/src/rules/READ # Features - Advanced rules based on pattern matching and control flow analysis -- [406 JS rules](https://rules.sonarsource.com/javascript) and [411 TS rules](https://rules.sonarsource.com/typescript) +- [408 JS rules](https://rules.sonarsource.com/javascript) and [413 TS rules](https://rules.sonarsource.com/typescript) - [26 CSS rules](https://rules.sonarsource.com/css) - Compatible with ECMAScript 2015-2020 - React JSX, Flow, Vue, and AWS lambda functions support for JavaScript and TypeScript diff --git a/package.json b/package.json index 1150226e490..19a8becd2f5 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "build:fast": "npm run bridge:build:fast && npm run _:plugin:pre-build && npm run plugin:build:fast", "bf": "npm run build:fast", "new-rule": "tsx tools/newRule.ts", - "generate-meta": "tsx tools/generate-meta.ts && cd packages/jsts/src/rules && npm run eslint-docs", + "generate-meta": "tsx tools/generate-meta.ts && npm run format && cd packages/jsts/src/rules && npm run eslint-docs", "generate-rules-list": "node tools/generate-rules-list.js", "ruling": "node tools/prepare-ruling.js && tsx --tsconfig packages/tsconfig.test.json --test packages/ruling/tests/projects/*.ruling.test.ts", "ruling-parametrized": "node tools/prepare-ruling.js && SONAR_RULING_SETTINGS=../settings.js tsx --tsconfig packages/tsconfig.test.json --test packages/ruling/tests/projects/*.ruling.test.ts", diff --git a/tools/count-rules.js b/tools/count-rules.js index 616270c7a56..5d296edb30e 100644 --- a/tools/count-rules.js +++ b/tools/count-rules.js @@ -65,6 +65,6 @@ async function getJsonFiles(pathToRules) { return Promise.all( filenames .filter(filename => filename.endsWith('.json') && filename.length <= 'S1234.json'.length) - .map(async file => await import(path.join(pathToRules, file), { assert: { type: 'json' } })), + .map(async file => await import(path.join(pathToRules, file), { with: { type: 'json' } })), ); }