diff --git a/package.json b/package.json index 24ed747f427..4f0b0cedcc2 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "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", "ruling-sync": "rsync -avh packages/ruling/tests/actual/jsts/ its/ruling/src/test/expected/jsts/ --delete", "update-ruling-data": "mvn -f sonar-plugin/sonar-javascript-plugin/pom.xml compile && npx tsx packages/ruling/tests/tools/parseRulesData.ts", - "bridge:compile": "tsc -b packages profiling && npm run _:bridge:copy-protofiles", + "create-rule-indexes": "tsx tools/generate-rule-indexes.ts", + "bridge:compile": "npm run create-rule-indexes && tsc -b packages profiling && npm run _:bridge:copy-protofiles", "bridge:test": "tsx --tsconfig packages/tsconfig.test.json --test --test-reporter spec --test-reporter-destination stdout \"packages/*/src/rules/*[!node_modules]/**/*.test.ts\" \"packages/*[!ruling]/tests/**/*.test.ts\"", "bridge:test:cov": "odz run npm run bridge:test || true && odz report --reporters=text-lcov > lcov.info", "bridge:bundle": "node esbuild.mjs", @@ -37,7 +38,7 @@ "_:plugin-fetch-node": "node tools/fetch-node/scripts/wrapper.mjs", "_:plugin:pre-build": "npm run _:plugin:prepare-bridge && npm run _:plugin-fetch-node", "_:plugin:copy-bridge": "cpy sonarjs-1.0.0.tgz sonar-plugin/sonar-javascript-plugin/target/classes && cpy sonarjs-1.0.0.tgz sonar-plugin/standalone/target/classes", - "eslint-plugin:build": "npm ci && npm run eslint-plugin:compile && cd lib && npm pack", + "eslint-plugin:build": "npm run create-rule-indexes && npm ci && npm run eslint-plugin:compile && cd lib && npm pack", "eslint-plugin:compile": "npm run _:bridge:clear && npm run eslint-plugin:check && npm run eslint-plugin:emit && npm run eslint-plugin:types && npm run eslint-plugin:package-json && npm run eslint-plugin:copy-assets", "eslint-plugin:check": "tsc -p tsconfig-plugin.json --noEmit", "eslint-plugin:emit": "tsc -p tsconfig-plugin.json --noCheck --module commonjs --moduleResolution node --outDir lib/cjs", diff --git a/packages/jsts/src/rules/.gitignore b/packages/jsts/src/rules/.gitignore new file mode 100644 index 00000000000..260dac8013b --- /dev/null +++ b/packages/jsts/src/rules/.gitignore @@ -0,0 +1,2 @@ +rules.ts +plugin-rules.ts \ No newline at end of file diff --git a/packages/jsts/src/rules/S100/generated-meta.ts b/packages/jsts/src/rules/S100/generated-meta.ts new file mode 100644 index 00000000000..818b8d69d77 --- /dev/null +++ b/packages/jsts/src/rules/S100/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Function and method names should comply with a naming convention', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S100/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S100'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + format: { + type: 'string', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S100/meta.ts b/packages/jsts/src/rules/S100/meta.ts index 818b8d69d77..6dabcc0d031 100644 --- a/packages/jsts/src/rules/S100/meta.ts +++ b/packages/jsts/src/rules/S100/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Function and method names should comply with a naming convention', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S100/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S100'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - format: { - type: 'string', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'function-name'; diff --git a/packages/jsts/src/rules/S101/generated-meta.ts b/packages/jsts/src/rules/S101/generated-meta.ts new file mode 100644 index 00000000000..a8cb186e4ff --- /dev/null +++ b/packages/jsts/src/rules/S101/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Class names should comply with a naming convention', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S101/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S101'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + format: { + type: 'string', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S101/meta.ts b/packages/jsts/src/rules/S101/meta.ts index a8cb186e4ff..456bf8fe4b3 100644 --- a/packages/jsts/src/rules/S101/meta.ts +++ b/packages/jsts/src/rules/S101/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Class names should comply with a naming convention', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S101/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S101'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - format: { - type: 'string', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'class-name'; diff --git a/packages/jsts/src/rules/S103/generated-meta.ts b/packages/jsts/src/rules/S103/generated-meta.ts new file mode 100644 index 00000000000..20acb88dbc2 --- /dev/null +++ b/packages/jsts/src/rules/S103/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Lines should not be too long', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S103/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S103'; diff --git a/packages/jsts/src/rules/S103/index.ts b/packages/jsts/src/rules/S103/index.ts new file mode 100644 index 00000000000..83af493372e --- /dev/null +++ b/packages/jsts/src/rules/S103/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('max-len'); diff --git a/packages/jsts/src/rules/S103/meta.ts b/packages/jsts/src/rules/S103/meta.ts new file mode 100644 index 00000000000..79eed56de52 --- /dev/null +++ b/packages/jsts/src/rules/S103/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'max-len'; diff --git a/packages/jsts/src/rules/S104/generated-meta.ts b/packages/jsts/src/rules/S104/generated-meta.ts new file mode 100644 index 00000000000..a370dff46de --- /dev/null +++ b/packages/jsts/src/rules/S104/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Files should not have too many lines of code', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S104/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S104'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + maximum: { + type: 'integer', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S104/meta.ts b/packages/jsts/src/rules/S104/meta.ts index a370dff46de..7d58659d88b 100644 --- a/packages/jsts/src/rules/S104/meta.ts +++ b/packages/jsts/src/rules/S104/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Files should not have too many lines of code', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S104/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S104'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - maximum: { - type: 'integer', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'max-lines'; diff --git a/packages/jsts/src/rules/S105/generated-meta.ts b/packages/jsts/src/rules/S105/generated-meta.ts new file mode 100644 index 00000000000..bdb1ef9536b --- /dev/null +++ b/packages/jsts/src/rules/S105/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Tabulation characters should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S105/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S105'; diff --git a/packages/jsts/src/rules/S105/meta.ts b/packages/jsts/src/rules/S105/meta.ts index bdb1ef9536b..f093628854e 100644 --- a/packages/jsts/src/rules/S105/meta.ts +++ b/packages/jsts/src/rules/S105/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Tabulation characters should not be used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S105/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S105'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-tab'; diff --git a/packages/jsts/src/rules/S106/generated-meta.ts b/packages/jsts/src/rules/S106/generated-meta.ts new file mode 100644 index 00000000000..6c7dc232b36 --- /dev/null +++ b/packages/jsts/src/rules/S106/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Standard outputs should not be used directly to log anything', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S106/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S106'; diff --git a/packages/jsts/src/rules/S106/index.ts b/packages/jsts/src/rules/S106/index.ts new file mode 100644 index 00000000000..1edd3b3c59f --- /dev/null +++ b/packages/jsts/src/rules/S106/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-console'); diff --git a/packages/jsts/src/rules/S106/meta.ts b/packages/jsts/src/rules/S106/meta.ts new file mode 100644 index 00000000000..27cce5f1c54 --- /dev/null +++ b/packages/jsts/src/rules/S106/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-console'; diff --git a/packages/jsts/src/rules/S1066/generated-meta.ts b/packages/jsts/src/rules/S1066/generated-meta.ts new file mode 100644 index 00000000000..5beb16da361 --- /dev/null +++ b/packages/jsts/src/rules/S1066/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Mergeable "if" statements should be combined', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1066/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1066'; diff --git a/packages/jsts/src/rules/S1066/meta.ts b/packages/jsts/src/rules/S1066/meta.ts index 5beb16da361..9a31db2ab73 100644 --- a/packages/jsts/src/rules/S1066/meta.ts +++ b/packages/jsts/src/rules/S1066/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Mergeable "if" statements should be combined', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1066/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1066'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-collapsible-if'; diff --git a/packages/jsts/src/rules/S1067/generated-meta.ts b/packages/jsts/src/rules/S1067/generated-meta.ts new file mode 100644 index 00000000000..bb164a14b70 --- /dev/null +++ b/packages/jsts/src/rules/S1067/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Expressions should not be too complex', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1067/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1067'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 2, + items: [ + { + type: 'object', + properties: { + max: { + type: 'integer', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S1067/meta.ts b/packages/jsts/src/rules/S1067/meta.ts index bb164a14b70..52fe950351f 100644 --- a/packages/jsts/src/rules/S1067/meta.ts +++ b/packages/jsts/src/rules/S1067/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Expressions should not be too complex', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1067/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1067'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 2, - items: [ - { - type: 'object', - properties: { - max: { - type: 'integer', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'expression-complexity'; diff --git a/packages/jsts/src/rules/S1068/generated-meta.ts b/packages/jsts/src/rules/S1068/generated-meta.ts new file mode 100644 index 00000000000..593f106abb3 --- /dev/null +++ b/packages/jsts/src/rules/S1068/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Unused private class members should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1068/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1068'; diff --git a/packages/jsts/src/rules/S1068/index.ts b/packages/jsts/src/rules/S1068/index.ts index 7492434458d..ccf2a721c7f 100644 --- a/packages/jsts/src/rules/S1068/index.ts +++ b/packages/jsts/src/rules/S1068/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; -export const rule = decorate(eslintRules['no-unused-private-class-members']); +export const rule = decorate(getESLintCoreRule('no-unused-private-class-members')); diff --git a/packages/jsts/src/rules/S1068/meta.ts b/packages/jsts/src/rules/S1068/meta.ts index 593f106abb3..1ef562d723b 100644 --- a/packages/jsts/src/rules/S1068/meta.ts +++ b/packages/jsts/src/rules/S1068/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Unused private class members should be removed', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1068/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1068'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-unused-private-class-members'; diff --git a/packages/jsts/src/rules/S107/generated-meta.ts b/packages/jsts/src/rules/S107/generated-meta.ts new file mode 100644 index 00000000000..92338365dbd --- /dev/null +++ b/packages/jsts/src/rules/S107/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Functions should not have too many parameters', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S107/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S107'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + max: { + type: 'integer', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S107/meta.ts b/packages/jsts/src/rules/S107/meta.ts index 92338365dbd..53dfaf60f58 100644 --- a/packages/jsts/src/rules/S107/meta.ts +++ b/packages/jsts/src/rules/S107/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Functions should not have too many parameters', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S107/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S107'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - max: { - type: 'integer', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'max-params'; diff --git a/packages/jsts/src/rules/S107/rule.ts b/packages/jsts/src/rules/S107/rule.ts index 7050b374f8b..d73245cfc8e 100644 --- a/packages/jsts/src/rules/S107/rule.ts +++ b/packages/jsts/src/rules/S107/rule.ts @@ -22,7 +22,7 @@ import type { Rule } from 'eslint'; import estree from 'estree'; import { TSESTree } from '@typescript-eslint/utils'; -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { generateMeta, getFullyQualifiedName, @@ -34,7 +34,7 @@ import { import { FromSchema } from 'json-schema-to-ts'; import { meta, schema } from './meta.js'; -const eslintMaxParams = eslintRules['max-params']; +const eslintMaxParams = getESLintCoreRule('max-params'); const DEFAULT_MAXIMUM_FUNCTION_PARAMETERS = 7; diff --git a/packages/jsts/src/rules/S1077/generated-meta.ts b/packages/jsts/src/rules/S1077/generated-meta.ts new file mode 100644 index 00000000000..c90f99fa414 --- /dev/null +++ b/packages/jsts/src/rules/S1077/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: + 'Image, area, button with image and object elements should have an alternative text', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1077/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1077'; diff --git a/packages/jsts/src/rules/S1077/meta.ts b/packages/jsts/src/rules/S1077/meta.ts index c90f99fa414..bbcc940e909 100644 --- a/packages/jsts/src/rules/S1077/meta.ts +++ b/packages/jsts/src/rules/S1077/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: - 'Image, area, button with image and object elements should have an alternative text', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1077/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1077'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'alt-text'; diff --git a/packages/jsts/src/rules/S108/generated-meta.ts b/packages/jsts/src/rules/S108/generated-meta.ts new file mode 100644 index 00000000000..278274d08b9 --- /dev/null +++ b/packages/jsts/src/rules/S108/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Nested blocks of code should not be left empty', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S108/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S108'; diff --git a/packages/jsts/src/rules/S108/index.ts b/packages/jsts/src/rules/S108/index.ts new file mode 100644 index 00000000000..702db4a4b4a --- /dev/null +++ b/packages/jsts/src/rules/S108/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-empty'); diff --git a/packages/jsts/src/rules/S108/meta.ts b/packages/jsts/src/rules/S108/meta.ts new file mode 100644 index 00000000000..15cd833ef4e --- /dev/null +++ b/packages/jsts/src/rules/S108/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-empty'; diff --git a/packages/jsts/src/rules/S1082/generated-meta.ts b/packages/jsts/src/rules/S1082/generated-meta.ts new file mode 100644 index 00000000000..3760b963697 --- /dev/null +++ b/packages/jsts/src/rules/S1082/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Mouse events should have corresponding keyboard events', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1082/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1082'; diff --git a/packages/jsts/src/rules/S1082/meta.ts b/packages/jsts/src/rules/S1082/meta.ts index 3760b963697..c26074685a9 100644 --- a/packages/jsts/src/rules/S1082/meta.ts +++ b/packages/jsts/src/rules/S1082/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Mouse events should have corresponding keyboard events', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1082/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1082'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'mouse-events-a11y'; diff --git a/packages/jsts/src/rules/S109/generated-meta.ts b/packages/jsts/src/rules/S109/generated-meta.ts new file mode 100644 index 00000000000..a0f39b76fc7 --- /dev/null +++ b/packages/jsts/src/rules/S109/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Magic numbers should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S109/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S109'; diff --git a/packages/jsts/src/rules/S109/meta.ts b/packages/jsts/src/rules/S109/meta.ts index a0f39b76fc7..84c535edb40 100644 --- a/packages/jsts/src/rules/S109/meta.ts +++ b/packages/jsts/src/rules/S109/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Magic numbers should not be used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S109/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S109'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-magic-numbers'; diff --git a/packages/jsts/src/rules/S109/rule.ts b/packages/jsts/src/rules/S109/rule.ts index 2b4eb116e81..8a64901640d 100644 --- a/packages/jsts/src/rules/S109/rule.ts +++ b/packages/jsts/src/rules/S109/rule.ts @@ -21,7 +21,7 @@ import type { Rule } from 'eslint'; import estree from 'estree'; -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { generateMeta, getNodeParent, isMethodInvocation } from '../helpers/index.js'; import { meta } from './meta.js'; diff --git a/packages/jsts/src/rules/S1090/generated-meta.ts b/packages/jsts/src/rules/S1090/generated-meta.ts new file mode 100644 index 00000000000..fd11ab8d1ab --- /dev/null +++ b/packages/jsts/src/rules/S1090/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'iFrames must have a title', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1090/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1090'; diff --git a/packages/jsts/src/rules/S1090/index.ts b/packages/jsts/src/rules/S1090/index.ts new file mode 100644 index 00000000000..b70b18122b9 --- /dev/null +++ b/packages/jsts/src/rules/S1090/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from 'eslint-plugin-jsx-a11y'; +export const rule = rules['iframe-has-title']; diff --git a/packages/jsts/src/rules/S1090/meta.ts b/packages/jsts/src/rules/S1090/meta.ts new file mode 100644 index 00000000000..0629505a42b --- /dev/null +++ b/packages/jsts/src/rules/S1090/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'iframe-has-title'; diff --git a/packages/jsts/src/rules/S1105/generated-meta.ts b/packages/jsts/src/rules/S1105/generated-meta.ts new file mode 100644 index 00000000000..9b569f34a3b --- /dev/null +++ b/packages/jsts/src/rules/S1105/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'An open curly brace should be located at the end of a line', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1105/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S1105'; diff --git a/packages/jsts/src/rules/S1105/index.ts b/packages/jsts/src/rules/S1105/index.ts index 311322e69b2..a9554c12c20 100644 --- a/packages/jsts/src/rules/S1105/index.ts +++ b/packages/jsts/src/rules/S1105/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; -export const rule = decorate(eslintRules['brace-style']); +export const rule = decorate(getESLintCoreRule('brace-style')); diff --git a/packages/jsts/src/rules/S1105/meta.ts b/packages/jsts/src/rules/S1105/meta.ts index 9b569f34a3b..5d015796285 100644 --- a/packages/jsts/src/rules/S1105/meta.ts +++ b/packages/jsts/src/rules/S1105/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'An open curly brace should be located at the end of a line', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1105/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S1105'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'brace-style'; diff --git a/packages/jsts/src/rules/S1110/generated-meta.ts b/packages/jsts/src/rules/S1110/generated-meta.ts new file mode 100644 index 00000000000..e0d921815f3 --- /dev/null +++ b/packages/jsts/src/rules/S1110/generated-meta.ts @@ -0,0 +1,35 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Redundant pairs of parentheses should be removed', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1110/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', + deprecated: true, +}; + +export const sonarKey = 'S1110'; diff --git a/packages/jsts/src/rules/S1110/meta.ts b/packages/jsts/src/rules/S1110/meta.ts index e0d921815f3..2988ee1de6a 100644 --- a/packages/jsts/src/rules/S1110/meta.ts +++ b/packages/jsts/src/rules/S1110/meta.ts @@ -17,19 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Redundant pairs of parentheses should be removed', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1110/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', - deprecated: true, -}; - -export const sonarKey = 'S1110'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-redundant-parentheses'; diff --git a/packages/jsts/src/rules/S1116/generated-meta.ts b/packages/jsts/src/rules/S1116/generated-meta.ts new file mode 100644 index 00000000000..77f39f18132 --- /dev/null +++ b/packages/jsts/src/rules/S1116/generated-meta.ts @@ -0,0 +1,35 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Extra semicolons should be removed', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1116/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', + deprecated: true, +}; + +export const sonarKey = 'S1116'; diff --git a/packages/jsts/src/rules/S1116/index.ts b/packages/jsts/src/rules/S1116/index.ts index 28c6e19ece2..8ebe056c4fa 100644 --- a/packages/jsts/src/rules/S1116/index.ts +++ b/packages/jsts/src/rules/S1116/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { decorate } from './decorator.js'; export const rule = decorate(tsEslintRules['no-extra-semi']); diff --git a/packages/jsts/src/rules/S1116/meta.ts b/packages/jsts/src/rules/S1116/meta.ts index 77f39f18132..a1f0275f436 100644 --- a/packages/jsts/src/rules/S1116/meta.ts +++ b/packages/jsts/src/rules/S1116/meta.ts @@ -17,19 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Extra semicolons should be removed', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1116/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', - deprecated: true, -}; - -export const sonarKey = 'S1116'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-extra-semi'; diff --git a/packages/jsts/src/rules/S1117/generated-meta.ts b/packages/jsts/src/rules/S1117/generated-meta.ts new file mode 100644 index 00000000000..f67662d2d5b --- /dev/null +++ b/packages/jsts/src/rules/S1117/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Variables should not be shadowed', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1117/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1117'; diff --git a/packages/jsts/src/rules/S1117/index.ts b/packages/jsts/src/rules/S1117/index.ts new file mode 100644 index 00000000000..72cf58115ae --- /dev/null +++ b/packages/jsts/src/rules/S1117/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['no-shadow']; diff --git a/packages/jsts/src/rules/S1117/meta.ts b/packages/jsts/src/rules/S1117/meta.ts new file mode 100644 index 00000000000..94fecdb53db --- /dev/null +++ b/packages/jsts/src/rules/S1117/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-shadow'; diff --git a/packages/jsts/src/rules/S1119/generated-meta.ts b/packages/jsts/src/rules/S1119/generated-meta.ts new file mode 100644 index 00000000000..d8904846de1 --- /dev/null +++ b/packages/jsts/src/rules/S1119/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Labels should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1119/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1119'; diff --git a/packages/jsts/src/rules/S1119/meta.ts b/packages/jsts/src/rules/S1119/meta.ts index d8904846de1..a1c1e7fdb3d 100644 --- a/packages/jsts/src/rules/S1119/meta.ts +++ b/packages/jsts/src/rules/S1119/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Labels should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1119/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1119'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-labels'; diff --git a/packages/jsts/src/rules/S1121/generated-meta.ts b/packages/jsts/src/rules/S1121/generated-meta.ts new file mode 100644 index 00000000000..1cb14c29eac --- /dev/null +++ b/packages/jsts/src/rules/S1121/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Assignments should not be made from within sub-expressions', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1121/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1121'; diff --git a/packages/jsts/src/rules/S1121/meta.ts b/packages/jsts/src/rules/S1121/meta.ts index 1cb14c29eac..76ca44d134d 100644 --- a/packages/jsts/src/rules/S1121/meta.ts +++ b/packages/jsts/src/rules/S1121/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Assignments should not be made from within sub-expressions', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1121/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1121'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-nested-assignment'; diff --git a/packages/jsts/src/rules/S1125/generated-meta.ts b/packages/jsts/src/rules/S1125/generated-meta.ts new file mode 100644 index 00000000000..6f7ca13175c --- /dev/null +++ b/packages/jsts/src/rules/S1125/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Boolean literals should not be used in comparisons', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1125/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1125'; diff --git a/packages/jsts/src/rules/S1125/meta.ts b/packages/jsts/src/rules/S1125/meta.ts index 6f7ca13175c..143b55f0026 100644 --- a/packages/jsts/src/rules/S1125/meta.ts +++ b/packages/jsts/src/rules/S1125/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Boolean literals should not be used in comparisons', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1125/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1125'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-redundant-boolean'; diff --git a/packages/jsts/src/rules/S1126/generated-meta.ts b/packages/jsts/src/rules/S1126/generated-meta.ts new file mode 100644 index 00000000000..7c29b37fc6e --- /dev/null +++ b/packages/jsts/src/rules/S1126/generated-meta.ts @@ -0,0 +1,35 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: + 'Return of boolean expressions should not be wrapped into an "if-then-else" statement', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1126/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1126'; diff --git a/packages/jsts/src/rules/S1126/meta.ts b/packages/jsts/src/rules/S1126/meta.ts index 7c29b37fc6e..7eaed825d30 100644 --- a/packages/jsts/src/rules/S1126/meta.ts +++ b/packages/jsts/src/rules/S1126/meta.ts @@ -17,19 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: - 'Return of boolean expressions should not be wrapped into an "if-then-else" statement', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1126/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1126'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'prefer-single-boolean-return'; diff --git a/packages/jsts/src/rules/S1128/generated-meta.ts b/packages/jsts/src/rules/S1128/generated-meta.ts new file mode 100644 index 00000000000..087f54bbd19 --- /dev/null +++ b/packages/jsts/src/rules/S1128/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Unnecessary imports should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1128/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1128'; diff --git a/packages/jsts/src/rules/S1128/meta.ts b/packages/jsts/src/rules/S1128/meta.ts index 087f54bbd19..01bf7d7fca4 100644 --- a/packages/jsts/src/rules/S1128/meta.ts +++ b/packages/jsts/src/rules/S1128/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Unnecessary imports should be removed', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1128/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1128'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'unused-import'; diff --git a/packages/jsts/src/rules/S113/generated-meta.ts b/packages/jsts/src/rules/S113/generated-meta.ts new file mode 100644 index 00000000000..89654ed6e9c --- /dev/null +++ b/packages/jsts/src/rules/S113/generated-meta.ts @@ -0,0 +1,35 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Files should end with a newline', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S113/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', + deprecated: true, +}; + +export const sonarKey = 'S113'; diff --git a/packages/jsts/src/rules/S113/index.ts b/packages/jsts/src/rules/S113/index.ts new file mode 100644 index 00000000000..4b7b9eceb75 --- /dev/null +++ b/packages/jsts/src/rules/S113/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('eol-last'); diff --git a/packages/jsts/src/rules/S113/meta.ts b/packages/jsts/src/rules/S113/meta.ts new file mode 100644 index 00000000000..283e2c06266 --- /dev/null +++ b/packages/jsts/src/rules/S113/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'eol-last'; diff --git a/packages/jsts/src/rules/S1131/generated-meta.ts b/packages/jsts/src/rules/S1131/generated-meta.ts new file mode 100644 index 00000000000..79cf4384d3f --- /dev/null +++ b/packages/jsts/src/rules/S1131/generated-meta.ts @@ -0,0 +1,35 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Lines should not end with trailing whitespaces', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1131/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', + deprecated: true, +}; + +export const sonarKey = 'S1131'; diff --git a/packages/jsts/src/rules/S1131/index.ts b/packages/jsts/src/rules/S1131/index.ts new file mode 100644 index 00000000000..ee9d8e2f014 --- /dev/null +++ b/packages/jsts/src/rules/S1131/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-trailing-spaces'); diff --git a/packages/jsts/src/rules/S1131/meta.ts b/packages/jsts/src/rules/S1131/meta.ts new file mode 100644 index 00000000000..7b452d982c8 --- /dev/null +++ b/packages/jsts/src/rules/S1131/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-trailing-spaces'; diff --git a/packages/jsts/src/rules/S1134/generated-meta.ts b/packages/jsts/src/rules/S1134/generated-meta.ts new file mode 100644 index 00000000000..fad297f6002 --- /dev/null +++ b/packages/jsts/src/rules/S1134/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Track uses of "FIXME" tags', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1134/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1134'; diff --git a/packages/jsts/src/rules/S1134/meta.ts b/packages/jsts/src/rules/S1134/meta.ts index fad297f6002..24687051a4d 100644 --- a/packages/jsts/src/rules/S1134/meta.ts +++ b/packages/jsts/src/rules/S1134/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Track uses of "FIXME" tags', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1134/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1134'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'fixme-tag'; diff --git a/packages/jsts/src/rules/S1135/generated-meta.ts b/packages/jsts/src/rules/S1135/generated-meta.ts new file mode 100644 index 00000000000..3cbb36fee66 --- /dev/null +++ b/packages/jsts/src/rules/S1135/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Track uses of "TODO" tags', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1135/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1135'; diff --git a/packages/jsts/src/rules/S1135/meta.ts b/packages/jsts/src/rules/S1135/meta.ts index 3cbb36fee66..0751a405340 100644 --- a/packages/jsts/src/rules/S1135/meta.ts +++ b/packages/jsts/src/rules/S1135/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Track uses of "TODO" tags', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1135/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1135'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'todo-tag'; diff --git a/packages/jsts/src/rules/S1143/generated-meta.ts b/packages/jsts/src/rules/S1143/generated-meta.ts new file mode 100644 index 00000000000..7eaca7180b3 --- /dev/null +++ b/packages/jsts/src/rules/S1143/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Jump statements should not occur in "finally" blocks', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1143/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1143'; diff --git a/packages/jsts/src/rules/S1143/index.ts b/packages/jsts/src/rules/S1143/index.ts new file mode 100644 index 00000000000..d59da2d8641 --- /dev/null +++ b/packages/jsts/src/rules/S1143/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-unsafe-finally'); diff --git a/packages/jsts/src/rules/S1143/meta.ts b/packages/jsts/src/rules/S1143/meta.ts new file mode 100644 index 00000000000..b9e0e032073 --- /dev/null +++ b/packages/jsts/src/rules/S1143/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-unsafe-finally'; diff --git a/packages/jsts/src/rules/S1154/generated-meta.ts b/packages/jsts/src/rules/S1154/generated-meta.ts new file mode 100644 index 00000000000..955b0aee51d --- /dev/null +++ b/packages/jsts/src/rules/S1154/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Results of operations on strings should not be ignored', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1154/javascript', + requiresTypeChecking: true, + }, + deprecated: true, +}; + +export const sonarKey = 'S1154'; diff --git a/packages/jsts/src/rules/S1154/meta.ts b/packages/jsts/src/rules/S1154/meta.ts index 955b0aee51d..b2d7d2c5258 100644 --- a/packages/jsts/src/rules/S1154/meta.ts +++ b/packages/jsts/src/rules/S1154/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Results of operations on strings should not be ignored', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1154/javascript', - requiresTypeChecking: true, - }, - deprecated: true, -}; - -export const sonarKey = 'S1154'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'useless-string-operation'; diff --git a/packages/jsts/src/rules/S117/generated-meta.ts b/packages/jsts/src/rules/S117/generated-meta.ts new file mode 100644 index 00000000000..80456b75339 --- /dev/null +++ b/packages/jsts/src/rules/S117/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Variable, property and parameter names should comply with a naming convention', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S117/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S117'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + format: { + type: 'string', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S117/meta.ts b/packages/jsts/src/rules/S117/meta.ts index 80456b75339..ef040a220e3 100644 --- a/packages/jsts/src/rules/S117/meta.ts +++ b/packages/jsts/src/rules/S117/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Variable, property and parameter names should comply with a naming convention', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S117/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S117'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - format: { - type: 'string', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'variable-name'; diff --git a/packages/jsts/src/rules/S1172/generated-meta.ts b/packages/jsts/src/rules/S1172/generated-meta.ts new file mode 100644 index 00000000000..fe192ac206b --- /dev/null +++ b/packages/jsts/src/rules/S1172/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Unused function parameters should be removed', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1172/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1172'; diff --git a/packages/jsts/src/rules/S1172/meta.ts b/packages/jsts/src/rules/S1172/meta.ts index fe192ac206b..e82bf7d5602 100644 --- a/packages/jsts/src/rules/S1172/meta.ts +++ b/packages/jsts/src/rules/S1172/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Unused function parameters should be removed', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1172/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1172'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-unused-function-argument'; diff --git a/packages/jsts/src/rules/S1186/generated-meta.ts b/packages/jsts/src/rules/S1186/generated-meta.ts new file mode 100644 index 00000000000..0122765b37a --- /dev/null +++ b/packages/jsts/src/rules/S1186/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Functions should not be empty', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1186/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1186'; diff --git a/packages/jsts/src/rules/S1186/index.ts b/packages/jsts/src/rules/S1186/index.ts index 7f78fbbf17b..94e0302081b 100644 --- a/packages/jsts/src/rules/S1186/index.ts +++ b/packages/jsts/src/rules/S1186/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { decorate } from './decorator.js'; export const rule = decorate(tsEslintRules['no-empty-function']); diff --git a/packages/jsts/src/rules/S1186/meta.ts b/packages/jsts/src/rules/S1186/meta.ts index 0122765b37a..23bb5e079a3 100644 --- a/packages/jsts/src/rules/S1186/meta.ts +++ b/packages/jsts/src/rules/S1186/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Functions should not be empty', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1186/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1186'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-empty-function'; diff --git a/packages/jsts/src/rules/S1192/generated-meta.ts b/packages/jsts/src/rules/S1192/generated-meta.ts new file mode 100644 index 00000000000..e997f3d8e79 --- /dev/null +++ b/packages/jsts/src/rules/S1192/generated-meta.ts @@ -0,0 +1,54 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'String literals should not be duplicated', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1192/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1192'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 2, + items: [ + { + type: 'object', + properties: { + threshold: { + type: 'integer', + minimum: 2, + }, + ignoreStrings: { + type: 'string', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S1192/meta.ts b/packages/jsts/src/rules/S1192/meta.ts index e997f3d8e79..c51442030a2 100644 --- a/packages/jsts/src/rules/S1192/meta.ts +++ b/packages/jsts/src/rules/S1192/meta.ts @@ -17,38 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'String literals should not be duplicated', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1192/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1192'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 2, - items: [ - { - type: 'object', - properties: { - threshold: { - type: 'integer', - minimum: 2, - }, - ignoreStrings: { - type: 'string', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-duplicate-string'; diff --git a/packages/jsts/src/rules/S1199/generated-meta.ts b/packages/jsts/src/rules/S1199/generated-meta.ts new file mode 100644 index 00000000000..e12391a9fc8 --- /dev/null +++ b/packages/jsts/src/rules/S1199/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Nested code blocks should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1199/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1199'; diff --git a/packages/jsts/src/rules/S1199/index.ts b/packages/jsts/src/rules/S1199/index.ts new file mode 100644 index 00000000000..efd5eb1c7bb --- /dev/null +++ b/packages/jsts/src/rules/S1199/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-lone-blocks'); diff --git a/packages/jsts/src/rules/S1199/meta.ts b/packages/jsts/src/rules/S1199/meta.ts new file mode 100644 index 00000000000..c434d4e010b --- /dev/null +++ b/packages/jsts/src/rules/S1199/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-lone-blocks'; diff --git a/packages/jsts/src/rules/S121/generated-meta.ts b/packages/jsts/src/rules/S121/generated-meta.ts new file mode 100644 index 00000000000..8c3066d0903 --- /dev/null +++ b/packages/jsts/src/rules/S121/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Control structures should use curly braces', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S121/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S121'; diff --git a/packages/jsts/src/rules/S121/index.ts b/packages/jsts/src/rules/S121/index.ts new file mode 100644 index 00000000000..5f9b3dea59d --- /dev/null +++ b/packages/jsts/src/rules/S121/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('curly'); diff --git a/packages/jsts/src/rules/S121/meta.ts b/packages/jsts/src/rules/S121/meta.ts new file mode 100644 index 00000000000..a4ca5889f0d --- /dev/null +++ b/packages/jsts/src/rules/S121/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'curly'; diff --git a/packages/jsts/src/rules/S1219/generated-meta.ts b/packages/jsts/src/rules/S1219/generated-meta.ts new file mode 100644 index 00000000000..e9f16caf3ac --- /dev/null +++ b/packages/jsts/src/rules/S1219/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"switch" statements should not contain non-case labels', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1219/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1219'; diff --git a/packages/jsts/src/rules/S1219/meta.ts b/packages/jsts/src/rules/S1219/meta.ts index e9f16caf3ac..a0140fb2702 100644 --- a/packages/jsts/src/rules/S1219/meta.ts +++ b/packages/jsts/src/rules/S1219/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"switch" statements should not contain non-case labels', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1219/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1219'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-case-label-in-switch'; diff --git a/packages/jsts/src/rules/S122/generated-meta.ts b/packages/jsts/src/rules/S122/generated-meta.ts new file mode 100644 index 00000000000..cacbc793ccc --- /dev/null +++ b/packages/jsts/src/rules/S122/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Statements should be on separate lines', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S122/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S122'; diff --git a/packages/jsts/src/rules/S122/index.ts b/packages/jsts/src/rules/S122/index.ts new file mode 100644 index 00000000000..dd9bf6e53ec --- /dev/null +++ b/packages/jsts/src/rules/S122/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('max-statements-per-line'); diff --git a/packages/jsts/src/rules/S122/meta.ts b/packages/jsts/src/rules/S122/meta.ts new file mode 100644 index 00000000000..efac7cac4b4 --- /dev/null +++ b/packages/jsts/src/rules/S122/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'max-statements-per-line'; diff --git a/packages/jsts/src/rules/S1226/generated-meta.ts b/packages/jsts/src/rules/S1226/generated-meta.ts new file mode 100644 index 00000000000..2938c04a372 --- /dev/null +++ b/packages/jsts/src/rules/S1226/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: + 'Initial values of parameters, caught exceptions, and loop variables should not be ignored', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1226/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1226'; diff --git a/packages/jsts/src/rules/S1226/meta.ts b/packages/jsts/src/rules/S1226/meta.ts index 2938c04a372..44180f512f5 100644 --- a/packages/jsts/src/rules/S1226/meta.ts +++ b/packages/jsts/src/rules/S1226/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: - 'Initial values of parameters, caught exceptions, and loop variables should not be ignored', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1226/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1226'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-parameter-reassignment'; diff --git a/packages/jsts/src/rules/S124/generated-meta.ts b/packages/jsts/src/rules/S124/generated-meta.ts new file mode 100644 index 00000000000..df23bc1fe03 --- /dev/null +++ b/packages/jsts/src/rules/S124/generated-meta.ts @@ -0,0 +1,56 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Track comments matching a regular expression', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S124/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S124'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + regularExpression: { + type: 'string', + }, + message: { + type: 'string', + }, + flags: { + type: 'string', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S124/meta.ts b/packages/jsts/src/rules/S124/meta.ts index df23bc1fe03..4c722311f94 100644 --- a/packages/jsts/src/rules/S124/meta.ts +++ b/packages/jsts/src/rules/S124/meta.ts @@ -17,40 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Track comments matching a regular expression', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S124/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S124'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - regularExpression: { - type: 'string', - }, - message: { - type: 'string', - }, - flags: { - type: 'string', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'comment-regex'; diff --git a/packages/jsts/src/rules/S125/generated-meta.ts b/packages/jsts/src/rules/S125/generated-meta.ts new file mode 100644 index 00000000000..a0ca0a51826 --- /dev/null +++ b/packages/jsts/src/rules/S125/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Sections of code should not be commented out', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S125/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S125'; diff --git a/packages/jsts/src/rules/S125/meta.ts b/packages/jsts/src/rules/S125/meta.ts index a0ca0a51826..9d2cbbe06c8 100644 --- a/packages/jsts/src/rules/S125/meta.ts +++ b/packages/jsts/src/rules/S125/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Sections of code should not be commented out', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S125/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S125'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-commented-code'; diff --git a/packages/jsts/src/rules/S126/generated-meta.ts b/packages/jsts/src/rules/S126/generated-meta.ts new file mode 100644 index 00000000000..f6a937c1f43 --- /dev/null +++ b/packages/jsts/src/rules/S126/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"if ... else if" constructs should end with "else" clauses', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S126/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S126'; diff --git a/packages/jsts/src/rules/S126/meta.ts b/packages/jsts/src/rules/S126/meta.ts index f6a937c1f43..ef773dcb2db 100644 --- a/packages/jsts/src/rules/S126/meta.ts +++ b/packages/jsts/src/rules/S126/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"if ... else if" constructs should end with "else" clauses', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S126/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S126'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'elseif-without-else'; diff --git a/packages/jsts/src/rules/S1264/generated-meta.ts b/packages/jsts/src/rules/S1264/generated-meta.ts new file mode 100644 index 00000000000..3a205c35241 --- /dev/null +++ b/packages/jsts/src/rules/S1264/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'A "while" loop should be used instead of a "for" loop', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1264/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1264'; diff --git a/packages/jsts/src/rules/S1264/meta.ts b/packages/jsts/src/rules/S1264/meta.ts index 3a205c35241..14bb0d750f6 100644 --- a/packages/jsts/src/rules/S1264/meta.ts +++ b/packages/jsts/src/rules/S1264/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'A "while" loop should be used instead of a "for" loop', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1264/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1264'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'prefer-while'; diff --git a/packages/jsts/src/rules/S128/generated-meta.ts b/packages/jsts/src/rules/S128/generated-meta.ts new file mode 100644 index 00000000000..182c3bb6703 --- /dev/null +++ b/packages/jsts/src/rules/S128/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Switch cases should end with an unconditional "break" statement', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S128/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S128'; diff --git a/packages/jsts/src/rules/S128/meta.ts b/packages/jsts/src/rules/S128/meta.ts index 182c3bb6703..8c0b776ec95 100644 --- a/packages/jsts/src/rules/S128/meta.ts +++ b/packages/jsts/src/rules/S128/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Switch cases should end with an unconditional "break" statement', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S128/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S128'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-fallthrough'; diff --git a/packages/jsts/src/rules/S1301/generated-meta.ts b/packages/jsts/src/rules/S1301/generated-meta.ts new file mode 100644 index 00000000000..e00777841c3 --- /dev/null +++ b/packages/jsts/src/rules/S1301/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"if" statements should be preferred over "switch" when simpler', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1301/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1301'; diff --git a/packages/jsts/src/rules/S1301/meta.ts b/packages/jsts/src/rules/S1301/meta.ts index e00777841c3..c80d288a153 100644 --- a/packages/jsts/src/rules/S1301/meta.ts +++ b/packages/jsts/src/rules/S1301/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"if" statements should be preferred over "switch" when simpler', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1301/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1301'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-small-switch'; diff --git a/packages/jsts/src/rules/S131/generated-meta.ts b/packages/jsts/src/rules/S131/generated-meta.ts new file mode 100644 index 00000000000..6b9b419efb8 --- /dev/null +++ b/packages/jsts/src/rules/S131/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"switch" statements should have "default" clauses', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S131/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S131'; diff --git a/packages/jsts/src/rules/S131/meta.ts b/packages/jsts/src/rules/S131/meta.ts index 6b9b419efb8..8b818a7c97b 100644 --- a/packages/jsts/src/rules/S131/meta.ts +++ b/packages/jsts/src/rules/S131/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"switch" statements should have "default" clauses', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S131/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S131'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'switch-without-default'; diff --git a/packages/jsts/src/rules/S131/rule.ts b/packages/jsts/src/rules/S131/rule.ts index 97056a69885..b35d87d9223 100644 --- a/packages/jsts/src/rules/S131/rule.ts +++ b/packages/jsts/src/rules/S131/rule.ts @@ -21,7 +21,7 @@ import estree from 'estree'; import { Rule, SourceCode } from 'eslint'; -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { generateMeta, interceptReport, diff --git a/packages/jsts/src/rules/S1313/generated-meta.ts b/packages/jsts/src/rules/S1313/generated-meta.ts new file mode 100644 index 00000000000..3166a23fafa --- /dev/null +++ b/packages/jsts/src/rules/S1313/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Using hardcoded IP addresses is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1313/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1313'; diff --git a/packages/jsts/src/rules/S1313/meta.ts b/packages/jsts/src/rules/S1313/meta.ts index 3166a23fafa..92f2f7c0c21 100644 --- a/packages/jsts/src/rules/S1313/meta.ts +++ b/packages/jsts/src/rules/S1313/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Using hardcoded IP addresses is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1313/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1313'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-hardcoded-ip'; diff --git a/packages/jsts/src/rules/S1314/generated-meta.ts b/packages/jsts/src/rules/S1314/generated-meta.ts new file mode 100644 index 00000000000..18ac6e0d1d7 --- /dev/null +++ b/packages/jsts/src/rules/S1314/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Octal values should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1314/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1314'; diff --git a/packages/jsts/src/rules/S1314/index.ts b/packages/jsts/src/rules/S1314/index.ts new file mode 100644 index 00000000000..7e9b766118b --- /dev/null +++ b/packages/jsts/src/rules/S1314/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-octal'); diff --git a/packages/jsts/src/rules/S1314/meta.ts b/packages/jsts/src/rules/S1314/meta.ts new file mode 100644 index 00000000000..03b2e01c78e --- /dev/null +++ b/packages/jsts/src/rules/S1314/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-octal'; diff --git a/packages/jsts/src/rules/S1321/generated-meta.ts b/packages/jsts/src/rules/S1321/generated-meta.ts new file mode 100644 index 00000000000..f605c67de5d --- /dev/null +++ b/packages/jsts/src/rules/S1321/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"with" statements should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1321/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1321'; diff --git a/packages/jsts/src/rules/S1321/index.ts b/packages/jsts/src/rules/S1321/index.ts new file mode 100644 index 00000000000..f0e81d62607 --- /dev/null +++ b/packages/jsts/src/rules/S1321/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-with'); diff --git a/packages/jsts/src/rules/S1321/meta.ts b/packages/jsts/src/rules/S1321/meta.ts new file mode 100644 index 00000000000..deff51bb56b --- /dev/null +++ b/packages/jsts/src/rules/S1321/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-with'; diff --git a/packages/jsts/src/rules/S134/generated-meta.ts b/packages/jsts/src/rules/S134/generated-meta.ts new file mode 100644 index 00000000000..cdaa946fb92 --- /dev/null +++ b/packages/jsts/src/rules/S134/generated-meta.ts @@ -0,0 +1,51 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: + 'Control flow statements "if", "for", "while", "switch" and "try" should not be nested too deeply', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S134/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S134'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 2, + items: [ + { + type: 'object', + properties: { + maximumNestingLevel: { + type: 'integer', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S134/meta.ts b/packages/jsts/src/rules/S134/meta.ts index cdaa946fb92..dc771656c87 100644 --- a/packages/jsts/src/rules/S134/meta.ts +++ b/packages/jsts/src/rules/S134/meta.ts @@ -17,35 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: - 'Control flow statements "if", "for", "while", "switch" and "try" should not be nested too deeply', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S134/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S134'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 2, - items: [ - { - type: 'object', - properties: { - maximumNestingLevel: { - type: 'integer', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'nested-control-flow'; diff --git a/packages/jsts/src/rules/S135/generated-meta.ts b/packages/jsts/src/rules/S135/generated-meta.ts new file mode 100644 index 00000000000..e61769f73f4 --- /dev/null +++ b/packages/jsts/src/rules/S135/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Loops should not contain more than a single "break" or "continue" statement', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S135/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S135'; diff --git a/packages/jsts/src/rules/S135/meta.ts b/packages/jsts/src/rules/S135/meta.ts index e61769f73f4..9e210494269 100644 --- a/packages/jsts/src/rules/S135/meta.ts +++ b/packages/jsts/src/rules/S135/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Loops should not contain more than a single "break" or "continue" statement', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S135/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S135'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'too-many-break-or-continue-in-loop'; diff --git a/packages/jsts/src/rules/S138/generated-meta.ts b/packages/jsts/src/rules/S138/generated-meta.ts new file mode 100644 index 00000000000..00f89e22e7c --- /dev/null +++ b/packages/jsts/src/rules/S138/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Functions should not have too many lines of code', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S138/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S138'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + maximum: { + type: 'integer', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S138/meta.ts b/packages/jsts/src/rules/S138/meta.ts index 00f89e22e7c..f21a5f3214f 100644 --- a/packages/jsts/src/rules/S138/meta.ts +++ b/packages/jsts/src/rules/S138/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Functions should not have too many lines of code', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S138/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S138'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - maximum: { - type: 'integer', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'max-lines-per-function'; diff --git a/packages/jsts/src/rules/S139/generated-meta.ts b/packages/jsts/src/rules/S139/generated-meta.ts new file mode 100644 index 00000000000..f339c7ab42f --- /dev/null +++ b/packages/jsts/src/rules/S139/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Comments should not be located at the end of lines of code', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S139/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S139'; diff --git a/packages/jsts/src/rules/S139/index.ts b/packages/jsts/src/rules/S139/index.ts new file mode 100644 index 00000000000..6587d09cd20 --- /dev/null +++ b/packages/jsts/src/rules/S139/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('line-comment-position'); diff --git a/packages/jsts/src/rules/S139/meta.ts b/packages/jsts/src/rules/S139/meta.ts new file mode 100644 index 00000000000..9a0ea6026f7 --- /dev/null +++ b/packages/jsts/src/rules/S139/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'line-comment-position'; diff --git a/packages/jsts/src/rules/S1438/generated-meta.ts b/packages/jsts/src/rules/S1438/generated-meta.ts new file mode 100644 index 00000000000..9663538ed65 --- /dev/null +++ b/packages/jsts/src/rules/S1438/generated-meta.ts @@ -0,0 +1,35 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Statements should end with semicolons', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1438/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', + deprecated: true, +}; + +export const sonarKey = 'S1438'; diff --git a/packages/jsts/src/rules/S1438/index.ts b/packages/jsts/src/rules/S1438/index.ts index 4854d1eefdf..d7f09b3e738 100644 --- a/packages/jsts/src/rules/S1438/index.ts +++ b/packages/jsts/src/rules/S1438/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { decorate } from './decorator.js'; export const rule = decorate(tsEslintRules['semi']); diff --git a/packages/jsts/src/rules/S1438/meta.ts b/packages/jsts/src/rules/S1438/meta.ts index 9663538ed65..4442ca3418c 100644 --- a/packages/jsts/src/rules/S1438/meta.ts +++ b/packages/jsts/src/rules/S1438/meta.ts @@ -17,19 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Statements should end with semicolons', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1438/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', - deprecated: true, -}; - -export const sonarKey = 'S1438'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'semi'; diff --git a/packages/jsts/src/rules/S1439/generated-meta.ts b/packages/jsts/src/rules/S1439/generated-meta.ts new file mode 100644 index 00000000000..f148125fbcb --- /dev/null +++ b/packages/jsts/src/rules/S1439/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Only "while", "do", "for" and "switch" statements should be labelled', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1439/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1439'; diff --git a/packages/jsts/src/rules/S1439/meta.ts b/packages/jsts/src/rules/S1439/meta.ts index f148125fbcb..c7901375a63 100644 --- a/packages/jsts/src/rules/S1439/meta.ts +++ b/packages/jsts/src/rules/S1439/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Only "while", "do", "for" and "switch" statements should be labelled', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1439/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1439'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'label-position'; diff --git a/packages/jsts/src/rules/S1440/generated-meta.ts b/packages/jsts/src/rules/S1440/generated-meta.ts new file mode 100644 index 00000000000..ccee06280e0 --- /dev/null +++ b/packages/jsts/src/rules/S1440/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"===" and "!==" should be used instead of "==" and "!="', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1440/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1440'; diff --git a/packages/jsts/src/rules/S1440/index.ts b/packages/jsts/src/rules/S1440/index.ts new file mode 100644 index 00000000000..2784a7ab0bf --- /dev/null +++ b/packages/jsts/src/rules/S1440/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('eqeqeq'); diff --git a/packages/jsts/src/rules/S1440/meta.ts b/packages/jsts/src/rules/S1440/meta.ts new file mode 100644 index 00000000000..7ffcf0320ae --- /dev/null +++ b/packages/jsts/src/rules/S1440/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'eqeqeq'; diff --git a/packages/jsts/src/rules/S1441/generated-meta.ts b/packages/jsts/src/rules/S1441/generated-meta.ts new file mode 100644 index 00000000000..2b8edfbef4f --- /dev/null +++ b/packages/jsts/src/rules/S1441/generated-meta.ts @@ -0,0 +1,35 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Quotes for string literals should be used consistently', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1441/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', + deprecated: true, +}; + +export const sonarKey = 'S1441'; diff --git a/packages/jsts/src/rules/S1441/index.ts b/packages/jsts/src/rules/S1441/index.ts new file mode 100644 index 00000000000..a506fd5ead9 --- /dev/null +++ b/packages/jsts/src/rules/S1441/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('quotes'); diff --git a/packages/jsts/src/rules/S1441/meta.ts b/packages/jsts/src/rules/S1441/meta.ts new file mode 100644 index 00000000000..da2e0ad1844 --- /dev/null +++ b/packages/jsts/src/rules/S1441/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'quotes'; diff --git a/packages/jsts/src/rules/S1442/generated-meta.ts b/packages/jsts/src/rules/S1442/generated-meta.ts new file mode 100644 index 00000000000..efa5172ad23 --- /dev/null +++ b/packages/jsts/src/rules/S1442/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"alert(...)" should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1442/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S1442'; diff --git a/packages/jsts/src/rules/S1442/index.ts b/packages/jsts/src/rules/S1442/index.ts new file mode 100644 index 00000000000..16e4fde3347 --- /dev/null +++ b/packages/jsts/src/rules/S1442/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-alert'); diff --git a/packages/jsts/src/rules/S1442/meta.ts b/packages/jsts/src/rules/S1442/meta.ts new file mode 100644 index 00000000000..02668537968 --- /dev/null +++ b/packages/jsts/src/rules/S1442/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-alert'; diff --git a/packages/jsts/src/rules/S1444/generated-meta.ts b/packages/jsts/src/rules/S1444/generated-meta.ts new file mode 100644 index 00000000000..8d41917d42c --- /dev/null +++ b/packages/jsts/src/rules/S1444/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Public "static" fields should be read-only', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1444/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1444'; diff --git a/packages/jsts/src/rules/S1444/meta.ts b/packages/jsts/src/rules/S1444/meta.ts index 8d41917d42c..64a36d92185 100644 --- a/packages/jsts/src/rules/S1444/meta.ts +++ b/packages/jsts/src/rules/S1444/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Public "static" fields should be read-only', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1444/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1444'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'public-static-readonly'; diff --git a/packages/jsts/src/rules/S1451/generated-meta.ts b/packages/jsts/src/rules/S1451/generated-meta.ts new file mode 100644 index 00000000000..a3eef623d3a --- /dev/null +++ b/packages/jsts/src/rules/S1451/generated-meta.ts @@ -0,0 +1,53 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Track lack of copyright and license headers', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1451/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1451'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + headerFormat: { + type: 'string', + }, + isRegularExpression: { + type: 'boolean', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S1451/meta.ts b/packages/jsts/src/rules/S1451/meta.ts index a3eef623d3a..5a2ff8a005a 100644 --- a/packages/jsts/src/rules/S1451/meta.ts +++ b/packages/jsts/src/rules/S1451/meta.ts @@ -17,37 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Track lack of copyright and license headers', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1451/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1451'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - headerFormat: { - type: 'string', - }, - isRegularExpression: { - type: 'boolean', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'file-header'; diff --git a/packages/jsts/src/rules/S1472/generated-meta.ts b/packages/jsts/src/rules/S1472/generated-meta.ts new file mode 100644 index 00000000000..14013be1d7f --- /dev/null +++ b/packages/jsts/src/rules/S1472/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Function call arguments should not start on new lines', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1472/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1472'; diff --git a/packages/jsts/src/rules/S1472/meta.ts b/packages/jsts/src/rules/S1472/meta.ts index 14013be1d7f..d744ced7fc9 100644 --- a/packages/jsts/src/rules/S1472/meta.ts +++ b/packages/jsts/src/rules/S1472/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Function call arguments should not start on new lines', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1472/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1472'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'call-argument-line'; diff --git a/packages/jsts/src/rules/S1479/generated-meta.ts b/packages/jsts/src/rules/S1479/generated-meta.ts new file mode 100644 index 00000000000..6e48852f7a0 --- /dev/null +++ b/packages/jsts/src/rules/S1479/generated-meta.ts @@ -0,0 +1,45 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"switch" statements should not have too many "case" clauses', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1479/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1479'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'integer', + minimum: 0, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S1479/meta.ts b/packages/jsts/src/rules/S1479/meta.ts index 6e48852f7a0..a94437ff981 100644 --- a/packages/jsts/src/rules/S1479/meta.ts +++ b/packages/jsts/src/rules/S1479/meta.ts @@ -17,29 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"switch" statements should not have too many "case" clauses', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1479/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1479'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'integer', - minimum: 0, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'max-switch-cases'; diff --git a/packages/jsts/src/rules/S1481/generated-meta.ts b/packages/jsts/src/rules/S1481/generated-meta.ts new file mode 100644 index 00000000000..da9e1c32266 --- /dev/null +++ b/packages/jsts/src/rules/S1481/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Unused local variables and functions should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1481/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1481'; diff --git a/packages/jsts/src/rules/S1481/meta.ts b/packages/jsts/src/rules/S1481/meta.ts index da9e1c32266..319371138a1 100644 --- a/packages/jsts/src/rules/S1481/meta.ts +++ b/packages/jsts/src/rules/S1481/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Unused local variables and functions should be removed', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1481/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1481'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-unused-vars'; diff --git a/packages/jsts/src/rules/S1488/generated-meta.ts b/packages/jsts/src/rules/S1488/generated-meta.ts new file mode 100644 index 00000000000..a4aec6169a0 --- /dev/null +++ b/packages/jsts/src/rules/S1488/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Local variables should not be declared and then immediately returned or thrown', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1488/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1488'; diff --git a/packages/jsts/src/rules/S1488/meta.ts b/packages/jsts/src/rules/S1488/meta.ts index a4aec6169a0..c0077643838 100644 --- a/packages/jsts/src/rules/S1488/meta.ts +++ b/packages/jsts/src/rules/S1488/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Local variables should not be declared and then immediately returned or thrown', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1488/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1488'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'prefer-immediate-return'; diff --git a/packages/jsts/src/rules/S1515/generated-meta.ts b/packages/jsts/src/rules/S1515/generated-meta.ts new file mode 100644 index 00000000000..57e0344c988 --- /dev/null +++ b/packages/jsts/src/rules/S1515/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Functions should not be defined inside loops', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1515/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1515'; diff --git a/packages/jsts/src/rules/S1515/meta.ts b/packages/jsts/src/rules/S1515/meta.ts index 57e0344c988..66b271db3fd 100644 --- a/packages/jsts/src/rules/S1515/meta.ts +++ b/packages/jsts/src/rules/S1515/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Functions should not be defined inside loops', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1515/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1515'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'function-inside-loop'; diff --git a/packages/jsts/src/rules/S1516/generated-meta.ts b/packages/jsts/src/rules/S1516/generated-meta.ts new file mode 100644 index 00000000000..e50ac2815b8 --- /dev/null +++ b/packages/jsts/src/rules/S1516/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Multiline string literals should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1516/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1516'; diff --git a/packages/jsts/src/rules/S1516/index.ts b/packages/jsts/src/rules/S1516/index.ts new file mode 100644 index 00000000000..bf08e38321b --- /dev/null +++ b/packages/jsts/src/rules/S1516/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-multi-str'); diff --git a/packages/jsts/src/rules/S1516/meta.ts b/packages/jsts/src/rules/S1516/meta.ts new file mode 100644 index 00000000000..2ce88e4ee35 --- /dev/null +++ b/packages/jsts/src/rules/S1516/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-multi-str'; diff --git a/packages/jsts/src/rules/S1523/generated-meta.ts b/packages/jsts/src/rules/S1523/generated-meta.ts new file mode 100644 index 00000000000..8bf45e7c30b --- /dev/null +++ b/packages/jsts/src/rules/S1523/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Dynamically executing code is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1523/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1523'; diff --git a/packages/jsts/src/rules/S1523/meta.ts b/packages/jsts/src/rules/S1523/meta.ts index 8bf45e7c30b..7dce9766f8f 100644 --- a/packages/jsts/src/rules/S1523/meta.ts +++ b/packages/jsts/src/rules/S1523/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Dynamically executing code is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1523/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1523'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'code-eval'; diff --git a/packages/jsts/src/rules/S1523/rule.ts b/packages/jsts/src/rules/S1523/rule.ts index 595eeaf8455..3244a2282a6 100644 --- a/packages/jsts/src/rules/S1523/rule.ts +++ b/packages/jsts/src/rules/S1523/rule.ts @@ -22,11 +22,11 @@ import type { Rule } from 'eslint'; import estree from 'estree'; -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { generateMeta } from '../helpers/index.js'; import { meta } from './meta.js'; -const noScriptUrlRule = eslintRules['no-script-url']; +const noScriptUrlRule = getESLintCoreRule('no-script-url'); export const rule: Rule.RuleModule = { meta: generateMeta(meta as Rule.RuleMetaData, { diff --git a/packages/jsts/src/rules/S1525/generated-meta.ts b/packages/jsts/src/rules/S1525/generated-meta.ts new file mode 100644 index 00000000000..61febb301c8 --- /dev/null +++ b/packages/jsts/src/rules/S1525/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Debugger statements should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1525/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S1525'; diff --git a/packages/jsts/src/rules/S1525/index.ts b/packages/jsts/src/rules/S1525/index.ts new file mode 100644 index 00000000000..8547bb6c5f5 --- /dev/null +++ b/packages/jsts/src/rules/S1525/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-debugger'); diff --git a/packages/jsts/src/rules/S1525/meta.ts b/packages/jsts/src/rules/S1525/meta.ts new file mode 100644 index 00000000000..4105be28c30 --- /dev/null +++ b/packages/jsts/src/rules/S1525/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-debugger'; diff --git a/packages/jsts/src/rules/S1526/generated-meta.ts b/packages/jsts/src/rules/S1526/generated-meta.ts new file mode 100644 index 00000000000..9d60d044d36 --- /dev/null +++ b/packages/jsts/src/rules/S1526/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Variables declared with "var" should be declared before they are used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1526/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1526'; diff --git a/packages/jsts/src/rules/S1526/meta.ts b/packages/jsts/src/rules/S1526/meta.ts index 9d60d044d36..98c81d73a8b 100644 --- a/packages/jsts/src/rules/S1526/meta.ts +++ b/packages/jsts/src/rules/S1526/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Variables declared with "var" should be declared before they are used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1526/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1526'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-variable-usage-before-declaration'; diff --git a/packages/jsts/src/rules/S1527/generated-meta.ts b/packages/jsts/src/rules/S1527/generated-meta.ts new file mode 100644 index 00000000000..1109b772ef3 --- /dev/null +++ b/packages/jsts/src/rules/S1527/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Future reserved words should not be used as identifiers', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1527/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1527'; diff --git a/packages/jsts/src/rules/S1527/meta.ts b/packages/jsts/src/rules/S1527/meta.ts index 1109b772ef3..241ef3289b1 100644 --- a/packages/jsts/src/rules/S1527/meta.ts +++ b/packages/jsts/src/rules/S1527/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Future reserved words should not be used as identifiers', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1527/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1527'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'future-reserved-words'; diff --git a/packages/jsts/src/rules/S1528/generated-meta.ts b/packages/jsts/src/rules/S1528/generated-meta.ts new file mode 100644 index 00000000000..28252df2299 --- /dev/null +++ b/packages/jsts/src/rules/S1528/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Array constructors should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1528/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1528'; diff --git a/packages/jsts/src/rules/S1528/meta.ts b/packages/jsts/src/rules/S1528/meta.ts index 28252df2299..48ee9bbe878 100644 --- a/packages/jsts/src/rules/S1528/meta.ts +++ b/packages/jsts/src/rules/S1528/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Array constructors should not be used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1528/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1528'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'array-constructor'; diff --git a/packages/jsts/src/rules/S1529/generated-meta.ts b/packages/jsts/src/rules/S1529/generated-meta.ts new file mode 100644 index 00000000000..fc9fc203900 --- /dev/null +++ b/packages/jsts/src/rules/S1529/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Bitwise operators should not be used in boolean contexts', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1529/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1529'; diff --git a/packages/jsts/src/rules/S1529/meta.ts b/packages/jsts/src/rules/S1529/meta.ts index fc9fc203900..843556520f2 100644 --- a/packages/jsts/src/rules/S1529/meta.ts +++ b/packages/jsts/src/rules/S1529/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Bitwise operators should not be used in boolean contexts', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1529/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1529'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'bitwise-operators'; diff --git a/packages/jsts/src/rules/S1530/generated-meta.ts b/packages/jsts/src/rules/S1530/generated-meta.ts new file mode 100644 index 00000000000..47fa8b77ee1 --- /dev/null +++ b/packages/jsts/src/rules/S1530/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Function declarations should not be made within blocks', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1530/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1530'; diff --git a/packages/jsts/src/rules/S1530/meta.ts b/packages/jsts/src/rules/S1530/meta.ts index 47fa8b77ee1..ecc6565bf6c 100644 --- a/packages/jsts/src/rules/S1530/meta.ts +++ b/packages/jsts/src/rules/S1530/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Function declarations should not be made within blocks', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1530/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1530'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-function-declaration-in-block'; diff --git a/packages/jsts/src/rules/S1533/generated-meta.ts b/packages/jsts/src/rules/S1533/generated-meta.ts new file mode 100644 index 00000000000..7eec8fc33f8 --- /dev/null +++ b/packages/jsts/src/rules/S1533/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Wrapper objects should not be used for primitive types', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1533/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1533'; diff --git a/packages/jsts/src/rules/S1533/meta.ts b/packages/jsts/src/rules/S1533/meta.ts index 7eec8fc33f8..7876a69c3a3 100644 --- a/packages/jsts/src/rules/S1533/meta.ts +++ b/packages/jsts/src/rules/S1533/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Wrapper objects should not be used for primitive types', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1533/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1533'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-primitive-wrappers'; diff --git a/packages/jsts/src/rules/S1534/generated-meta.ts b/packages/jsts/src/rules/S1534/generated-meta.ts new file mode 100644 index 00000000000..77a8e470645 --- /dev/null +++ b/packages/jsts/src/rules/S1534/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Member names should not be duplicated within a class or object literal', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1534/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1534'; diff --git a/packages/jsts/src/rules/S1534/meta.ts b/packages/jsts/src/rules/S1534/meta.ts index 77a8e470645..dffd5cbc6ad 100644 --- a/packages/jsts/src/rules/S1534/meta.ts +++ b/packages/jsts/src/rules/S1534/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Member names should not be duplicated within a class or object literal', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1534/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1534'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-dupe-keys'; diff --git a/packages/jsts/src/rules/S1534/rule.ts b/packages/jsts/src/rules/S1534/rule.ts index af0faec3c94..070c56f941e 100644 --- a/packages/jsts/src/rules/S1534/rule.ts +++ b/packages/jsts/src/rules/S1534/rule.ts @@ -20,15 +20,15 @@ // https://sonarsource.github.io/rspec/#/rspec/S1534/javascript import type { Rule } from 'eslint'; -import { eslintRules } from '../core/index.js'; -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { getESLintCoreRule } from '../core/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import pkg from 'eslint-plugin-react'; const { rules: reactRules } = pkg; import { generateMeta, mergeRules } from '../helpers/index.js'; import { decorate } from './decorator.js'; import { meta } from './meta.js'; -const noDupeKeysRule = decorate(eslintRules['no-dupe-keys']); +const noDupeKeysRule = decorate(getESLintCoreRule('no-dupe-keys')); const noDupeClassMembersRule = tsEslintRules['no-dupe-class-members']; const jsxNoDuplicatePropsRule = reactRules['jsx-no-duplicate-props']; diff --git a/packages/jsts/src/rules/S1535/generated-meta.ts b/packages/jsts/src/rules/S1535/generated-meta.ts new file mode 100644 index 00000000000..6c5011d0323 --- /dev/null +++ b/packages/jsts/src/rules/S1535/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"for...in" loops should filter properties before acting on them', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1535/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1535'; diff --git a/packages/jsts/src/rules/S1535/meta.ts b/packages/jsts/src/rules/S1535/meta.ts index 6c5011d0323..4109d8f389b 100644 --- a/packages/jsts/src/rules/S1535/meta.ts +++ b/packages/jsts/src/rules/S1535/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: '"for...in" loops should filter properties before acting on them', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1535/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1535'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'for-in'; diff --git a/packages/jsts/src/rules/S1536/generated-meta.ts b/packages/jsts/src/rules/S1536/generated-meta.ts new file mode 100644 index 00000000000..e6a9f7290e9 --- /dev/null +++ b/packages/jsts/src/rules/S1536/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Function argument names should be unique', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1536/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1536'; diff --git a/packages/jsts/src/rules/S1536/index.ts b/packages/jsts/src/rules/S1536/index.ts new file mode 100644 index 00000000000..4c4229f5990 --- /dev/null +++ b/packages/jsts/src/rules/S1536/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-dupe-args'); diff --git a/packages/jsts/src/rules/S1536/meta.ts b/packages/jsts/src/rules/S1536/meta.ts new file mode 100644 index 00000000000..81541732c11 --- /dev/null +++ b/packages/jsts/src/rules/S1536/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-dupe-args'; diff --git a/packages/jsts/src/rules/S1537/generated-meta.ts b/packages/jsts/src/rules/S1537/generated-meta.ts new file mode 100644 index 00000000000..4ae6e94de1b --- /dev/null +++ b/packages/jsts/src/rules/S1537/generated-meta.ts @@ -0,0 +1,35 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Trailing commas should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1537/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', + deprecated: true, +}; + +export const sonarKey = 'S1537'; diff --git a/packages/jsts/src/rules/S1537/index.ts b/packages/jsts/src/rules/S1537/index.ts new file mode 100644 index 00000000000..8485538841a --- /dev/null +++ b/packages/jsts/src/rules/S1537/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['comma-dangle']; diff --git a/packages/jsts/src/rules/S1537/meta.ts b/packages/jsts/src/rules/S1537/meta.ts new file mode 100644 index 00000000000..d76143b96c0 --- /dev/null +++ b/packages/jsts/src/rules/S1537/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'comma-dangle'; diff --git a/packages/jsts/src/rules/S1539/generated-meta.ts b/packages/jsts/src/rules/S1539/generated-meta.ts new file mode 100644 index 00000000000..aa13b480490 --- /dev/null +++ b/packages/jsts/src/rules/S1539/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"strict" mode should be used with caution', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1539/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1539'; diff --git a/packages/jsts/src/rules/S1539/index.ts b/packages/jsts/src/rules/S1539/index.ts new file mode 100644 index 00000000000..35cb1d496ed --- /dev/null +++ b/packages/jsts/src/rules/S1539/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('strict'); diff --git a/packages/jsts/src/rules/S1539/meta.ts b/packages/jsts/src/rules/S1539/meta.ts new file mode 100644 index 00000000000..29c0743f70c --- /dev/null +++ b/packages/jsts/src/rules/S1539/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'strict'; diff --git a/packages/jsts/src/rules/S1541/generated-meta.ts b/packages/jsts/src/rules/S1541/generated-meta.ts new file mode 100644 index 00000000000..ddef7e7a421 --- /dev/null +++ b/packages/jsts/src/rules/S1541/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Cyclomatic Complexity of functions should not be too high', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1541/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1541'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 2, + items: [ + { + type: 'object', + properties: { + threshold: { + type: 'integer', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S1541/meta.ts b/packages/jsts/src/rules/S1541/meta.ts index ddef7e7a421..d14dd25246d 100644 --- a/packages/jsts/src/rules/S1541/meta.ts +++ b/packages/jsts/src/rules/S1541/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Cyclomatic Complexity of functions should not be too high', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1541/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1541'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 2, - items: [ - { - type: 'object', - properties: { - threshold: { - type: 'integer', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'cyclomatic-complexity'; diff --git a/packages/jsts/src/rules/S1607/generated-meta.ts b/packages/jsts/src/rules/S1607/generated-meta.ts new file mode 100644 index 00000000000..060bd51d862 --- /dev/null +++ b/packages/jsts/src/rules/S1607/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Tests should not be skipped without providing a reason', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1607/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1607'; diff --git a/packages/jsts/src/rules/S1607/meta.ts b/packages/jsts/src/rules/S1607/meta.ts index 060bd51d862..c4693d24b6c 100644 --- a/packages/jsts/src/rules/S1607/meta.ts +++ b/packages/jsts/src/rules/S1607/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Tests should not be skipped without providing a reason', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1607/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1607'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-skipped-tests'; diff --git a/packages/jsts/src/rules/S1656/generated-meta.ts b/packages/jsts/src/rules/S1656/generated-meta.ts new file mode 100644 index 00000000000..a43ea906459 --- /dev/null +++ b/packages/jsts/src/rules/S1656/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Variables should not be self-assigned', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1656/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1656'; diff --git a/packages/jsts/src/rules/S1656/index.ts b/packages/jsts/src/rules/S1656/index.ts new file mode 100644 index 00000000000..0acfb31bf00 --- /dev/null +++ b/packages/jsts/src/rules/S1656/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-self-assign'); diff --git a/packages/jsts/src/rules/S1656/meta.ts b/packages/jsts/src/rules/S1656/meta.ts new file mode 100644 index 00000000000..5536f70f959 --- /dev/null +++ b/packages/jsts/src/rules/S1656/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-self-assign'; diff --git a/packages/jsts/src/rules/S1751/generated-meta.ts b/packages/jsts/src/rules/S1751/generated-meta.ts new file mode 100644 index 00000000000..08751b4dde9 --- /dev/null +++ b/packages/jsts/src/rules/S1751/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Loops with at most one iteration should be refactored', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1751/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1751'; diff --git a/packages/jsts/src/rules/S1751/meta.ts b/packages/jsts/src/rules/S1751/meta.ts index 08751b4dde9..4041315b04a 100644 --- a/packages/jsts/src/rules/S1751/meta.ts +++ b/packages/jsts/src/rules/S1751/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Loops with at most one iteration should be refactored', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1751/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1751'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-one-iteration-loop'; diff --git a/packages/jsts/src/rules/S1763/generated-meta.ts b/packages/jsts/src/rules/S1763/generated-meta.ts new file mode 100644 index 00000000000..128e6010a73 --- /dev/null +++ b/packages/jsts/src/rules/S1763/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'All code should be reachable', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1763/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1763'; diff --git a/packages/jsts/src/rules/S1763/index.ts b/packages/jsts/src/rules/S1763/index.ts index b7ab588d102..2ffb73fa757 100644 --- a/packages/jsts/src/rules/S1763/index.ts +++ b/packages/jsts/src/rules/S1763/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; -export const rule = decorate(eslintRules['no-unreachable']); +export const rule = decorate(getESLintCoreRule('no-unreachable')); diff --git a/packages/jsts/src/rules/S1763/meta.ts b/packages/jsts/src/rules/S1763/meta.ts index 128e6010a73..3b7e4397b53 100644 --- a/packages/jsts/src/rules/S1763/meta.ts +++ b/packages/jsts/src/rules/S1763/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'All code should be reachable', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1763/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1763'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-unreachable'; diff --git a/packages/jsts/src/rules/S1764/generated-meta.ts b/packages/jsts/src/rules/S1764/generated-meta.ts new file mode 100644 index 00000000000..4f66a59f17f --- /dev/null +++ b/packages/jsts/src/rules/S1764/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Identical expressions should not be used on both sides of a binary operator', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1764/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1764'; diff --git a/packages/jsts/src/rules/S1764/meta.ts b/packages/jsts/src/rules/S1764/meta.ts index 4f66a59f17f..42152a0a7e4 100644 --- a/packages/jsts/src/rules/S1764/meta.ts +++ b/packages/jsts/src/rules/S1764/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Identical expressions should not be used on both sides of a binary operator', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1764/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1764'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-identical-expressions'; diff --git a/packages/jsts/src/rules/S1774/generated-meta.ts b/packages/jsts/src/rules/S1774/generated-meta.ts new file mode 100644 index 00000000000..2cc9f2084eb --- /dev/null +++ b/packages/jsts/src/rules/S1774/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'The ternary operator should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1774/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1774'; diff --git a/packages/jsts/src/rules/S1774/index.ts b/packages/jsts/src/rules/S1774/index.ts new file mode 100644 index 00000000000..76311f33471 --- /dev/null +++ b/packages/jsts/src/rules/S1774/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-ternary'); diff --git a/packages/jsts/src/rules/S1774/meta.ts b/packages/jsts/src/rules/S1774/meta.ts new file mode 100644 index 00000000000..8ee1510a098 --- /dev/null +++ b/packages/jsts/src/rules/S1774/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-ternary'; diff --git a/packages/jsts/src/rules/S1788/generated-meta.ts b/packages/jsts/src/rules/S1788/generated-meta.ts new file mode 100644 index 00000000000..f7eb3742519 --- /dev/null +++ b/packages/jsts/src/rules/S1788/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Function parameters with default values should be last', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1788/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1788'; diff --git a/packages/jsts/src/rules/S1788/index.ts b/packages/jsts/src/rules/S1788/index.ts index e7322967895..e49e08e25ae 100644 --- a/packages/jsts/src/rules/S1788/index.ts +++ b/packages/jsts/src/rules/S1788/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { decorate } from './decorator.js'; export const rule = decorate(tsEslintRules['default-param-last']); diff --git a/packages/jsts/src/rules/S1788/meta.ts b/packages/jsts/src/rules/S1788/meta.ts index f7eb3742519..93d1dddbaf5 100644 --- a/packages/jsts/src/rules/S1788/meta.ts +++ b/packages/jsts/src/rules/S1788/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Function parameters with default values should be last', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1788/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1788'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'default-param-last'; diff --git a/packages/jsts/src/rules/S1821/generated-meta.ts b/packages/jsts/src/rules/S1821/generated-meta.ts new file mode 100644 index 00000000000..5ac61f93b5c --- /dev/null +++ b/packages/jsts/src/rules/S1821/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"switch" statements should not be nested', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1821/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1821'; diff --git a/packages/jsts/src/rules/S1821/meta.ts b/packages/jsts/src/rules/S1821/meta.ts index 5ac61f93b5c..410ec9c3371 100644 --- a/packages/jsts/src/rules/S1821/meta.ts +++ b/packages/jsts/src/rules/S1821/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"switch" statements should not be nested', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1821/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1821'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-nested-switch'; diff --git a/packages/jsts/src/rules/S1848/generated-meta.ts b/packages/jsts/src/rules/S1848/generated-meta.ts new file mode 100644 index 00000000000..b56bb6033ea --- /dev/null +++ b/packages/jsts/src/rules/S1848/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Objects should not be created to be dropped immediately without being used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1848/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1848'; diff --git a/packages/jsts/src/rules/S1848/meta.ts b/packages/jsts/src/rules/S1848/meta.ts index b56bb6033ea..b1a439dd584 100644 --- a/packages/jsts/src/rules/S1848/meta.ts +++ b/packages/jsts/src/rules/S1848/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Objects should not be created to be dropped immediately without being used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1848/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1848'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'constructor-for-side-effects'; diff --git a/packages/jsts/src/rules/S1854/generated-meta.ts b/packages/jsts/src/rules/S1854/generated-meta.ts new file mode 100644 index 00000000000..e01908b275f --- /dev/null +++ b/packages/jsts/src/rules/S1854/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Unused assignments should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1854/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1854'; diff --git a/packages/jsts/src/rules/S1854/meta.ts b/packages/jsts/src/rules/S1854/meta.ts index e01908b275f..173bde5dd37 100644 --- a/packages/jsts/src/rules/S1854/meta.ts +++ b/packages/jsts/src/rules/S1854/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Unused assignments should be removed', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1854/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1854'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-dead-store'; diff --git a/packages/jsts/src/rules/S1862/generated-meta.ts b/packages/jsts/src/rules/S1862/generated-meta.ts new file mode 100644 index 00000000000..e9dcfffb24d --- /dev/null +++ b/packages/jsts/src/rules/S1862/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"if/else if" chains and "switch" cases should not have the same condition', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1862/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1862'; diff --git a/packages/jsts/src/rules/S1862/meta.ts b/packages/jsts/src/rules/S1862/meta.ts index e9dcfffb24d..dd5ac5c80eb 100644 --- a/packages/jsts/src/rules/S1862/meta.ts +++ b/packages/jsts/src/rules/S1862/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: '"if/else if" chains and "switch" cases should not have the same condition', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1862/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1862'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-identical-conditions'; diff --git a/packages/jsts/src/rules/S1871/generated-meta.ts b/packages/jsts/src/rules/S1871/generated-meta.ts new file mode 100644 index 00000000000..82e4ea48b87 --- /dev/null +++ b/packages/jsts/src/rules/S1871/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: + 'Two branches in a conditional structure should not have exactly the same implementation', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1871/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1871'; diff --git a/packages/jsts/src/rules/S1871/meta.ts b/packages/jsts/src/rules/S1871/meta.ts index 82e4ea48b87..248e3bfd5ea 100644 --- a/packages/jsts/src/rules/S1871/meta.ts +++ b/packages/jsts/src/rules/S1871/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: - 'Two branches in a conditional structure should not have exactly the same implementation', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1871/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1871'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-duplicated-branches'; diff --git a/packages/jsts/src/rules/S1874/generated-meta.ts b/packages/jsts/src/rules/S1874/generated-meta.ts new file mode 100644 index 00000000000..e95eba96a8b --- /dev/null +++ b/packages/jsts/src/rules/S1874/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Deprecated APIs should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1874/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S1874'; diff --git a/packages/jsts/src/rules/S1874/meta.ts b/packages/jsts/src/rules/S1874/meta.ts index e95eba96a8b..78f75c27964 100644 --- a/packages/jsts/src/rules/S1874/meta.ts +++ b/packages/jsts/src/rules/S1874/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Deprecated APIs should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1874/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S1874'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'deprecation'; diff --git a/packages/jsts/src/rules/S1940/generated-meta.ts b/packages/jsts/src/rules/S1940/generated-meta.ts new file mode 100644 index 00000000000..8e623631131 --- /dev/null +++ b/packages/jsts/src/rules/S1940/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Boolean checks should not be inverted', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1940/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S1940'; diff --git a/packages/jsts/src/rules/S1940/meta.ts b/packages/jsts/src/rules/S1940/meta.ts index 8e623631131..f5d1ca8e880 100644 --- a/packages/jsts/src/rules/S1940/meta.ts +++ b/packages/jsts/src/rules/S1940/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Boolean checks should not be inverted', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1940/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S1940'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-inverted-boolean-check'; diff --git a/packages/jsts/src/rules/S1994/generated-meta.ts b/packages/jsts/src/rules/S1994/generated-meta.ts new file mode 100644 index 00000000000..e2405e8fbb0 --- /dev/null +++ b/packages/jsts/src/rules/S1994/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"for" loop increment clauses should modify the loops\' counters', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S1994/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S1994'; diff --git a/packages/jsts/src/rules/S1994/meta.ts b/packages/jsts/src/rules/S1994/meta.ts index e2405e8fbb0..0315dbf0e23 100644 --- a/packages/jsts/src/rules/S1994/meta.ts +++ b/packages/jsts/src/rules/S1994/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"for" loop increment clauses should modify the loops\' counters', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S1994/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S1994'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'misplaced-loop-counter'; diff --git a/packages/jsts/src/rules/S2004/generated-meta.ts b/packages/jsts/src/rules/S2004/generated-meta.ts new file mode 100644 index 00000000000..0a4246ad695 --- /dev/null +++ b/packages/jsts/src/rules/S2004/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Functions should not be nested too deeply', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2004/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2004'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 2, + items: [ + { + type: 'object', + properties: { + threshold: { + type: 'integer', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S2004/meta.ts b/packages/jsts/src/rules/S2004/meta.ts index 0a4246ad695..596fb7eb93c 100644 --- a/packages/jsts/src/rules/S2004/meta.ts +++ b/packages/jsts/src/rules/S2004/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Functions should not be nested too deeply', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2004/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2004'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 2, - items: [ - { - type: 'object', - properties: { - threshold: { - type: 'integer', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-nested-functions'; diff --git a/packages/jsts/src/rules/S2068/generated-meta.ts b/packages/jsts/src/rules/S2068/generated-meta.ts new file mode 100644 index 00000000000..cd99b9ffb73 --- /dev/null +++ b/packages/jsts/src/rules/S2068/generated-meta.ts @@ -0,0 +1,53 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Hard-coded credentials are security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2068/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2068'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + credentialWords: { + type: 'array', + items: { + type: 'string', + }, + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S2068/meta.ts b/packages/jsts/src/rules/S2068/meta.ts index cd99b9ffb73..2332f54cbe3 100644 --- a/packages/jsts/src/rules/S2068/meta.ts +++ b/packages/jsts/src/rules/S2068/meta.ts @@ -17,37 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Hard-coded credentials are security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2068/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2068'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - credentialWords: { - type: 'array', - items: { - type: 'string', - }, - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-hardcoded-credentials'; diff --git a/packages/jsts/src/rules/S2077/generated-meta.ts b/packages/jsts/src/rules/S2077/generated-meta.ts new file mode 100644 index 00000000000..b9b8f50d98b --- /dev/null +++ b/packages/jsts/src/rules/S2077/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Formatting SQL queries is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2077/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2077'; diff --git a/packages/jsts/src/rules/S2077/meta.ts b/packages/jsts/src/rules/S2077/meta.ts index b9b8f50d98b..8a53db72c5c 100644 --- a/packages/jsts/src/rules/S2077/meta.ts +++ b/packages/jsts/src/rules/S2077/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Formatting SQL queries is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2077/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2077'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'sql-queries'; diff --git a/packages/jsts/src/rules/S2092/generated-meta.ts b/packages/jsts/src/rules/S2092/generated-meta.ts new file mode 100644 index 00000000000..84eea7a8e70 --- /dev/null +++ b/packages/jsts/src/rules/S2092/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Creating cookies without the "secure" flag is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2092/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2092'; diff --git a/packages/jsts/src/rules/S2092/meta.ts b/packages/jsts/src/rules/S2092/meta.ts index 84eea7a8e70..e8552bac963 100644 --- a/packages/jsts/src/rules/S2092/meta.ts +++ b/packages/jsts/src/rules/S2092/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Creating cookies without the "secure" flag is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2092/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2092'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'insecure-cookie'; diff --git a/packages/jsts/src/rules/S2094/generated-meta.ts b/packages/jsts/src/rules/S2094/generated-meta.ts new file mode 100644 index 00000000000..949e9737bc0 --- /dev/null +++ b/packages/jsts/src/rules/S2094/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Classes should not be empty', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2094/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2094'; diff --git a/packages/jsts/src/rules/S2094/index.ts b/packages/jsts/src/rules/S2094/index.ts new file mode 100644 index 00000000000..77da5b9b763 --- /dev/null +++ b/packages/jsts/src/rules/S2094/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['no-extraneous-class']; diff --git a/packages/jsts/src/rules/S2094/meta.ts b/packages/jsts/src/rules/S2094/meta.ts new file mode 100644 index 00000000000..ca5165a98ad --- /dev/null +++ b/packages/jsts/src/rules/S2094/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-extraneous-class'; diff --git a/packages/jsts/src/rules/S2123/generated-meta.ts b/packages/jsts/src/rules/S2123/generated-meta.ts new file mode 100644 index 00000000000..a068945076b --- /dev/null +++ b/packages/jsts/src/rules/S2123/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Values should not be uselessly incremented', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2123/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2123'; diff --git a/packages/jsts/src/rules/S2123/meta.ts b/packages/jsts/src/rules/S2123/meta.ts index a068945076b..8f481a5d01b 100644 --- a/packages/jsts/src/rules/S2123/meta.ts +++ b/packages/jsts/src/rules/S2123/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Values should not be uselessly incremented', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2123/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2123'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-useless-increment'; diff --git a/packages/jsts/src/rules/S2137/generated-meta.ts b/packages/jsts/src/rules/S2137/generated-meta.ts new file mode 100644 index 00000000000..a0f7ea4de04 --- /dev/null +++ b/packages/jsts/src/rules/S2137/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Special identifiers should not be bound or assigned', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2137/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2137'; diff --git a/packages/jsts/src/rules/S2137/meta.ts b/packages/jsts/src/rules/S2137/meta.ts index a0f7ea4de04..1ac84a1b482 100644 --- a/packages/jsts/src/rules/S2137/meta.ts +++ b/packages/jsts/src/rules/S2137/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Special identifiers should not be bound or assigned', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2137/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2137'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-globals-shadowing'; diff --git a/packages/jsts/src/rules/S2138/generated-meta.ts b/packages/jsts/src/rules/S2138/generated-meta.ts new file mode 100644 index 00000000000..0bdd8476c83 --- /dev/null +++ b/packages/jsts/src/rules/S2138/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"undefined" should not be assigned', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2138/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2138'; diff --git a/packages/jsts/src/rules/S2138/meta.ts b/packages/jsts/src/rules/S2138/meta.ts index 0bdd8476c83..92bb8a6f5e2 100644 --- a/packages/jsts/src/rules/S2138/meta.ts +++ b/packages/jsts/src/rules/S2138/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"undefined" should not be assigned', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2138/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2138'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-undefined-assignment'; diff --git a/packages/jsts/src/rules/S2187/generated-meta.ts b/packages/jsts/src/rules/S2187/generated-meta.ts new file mode 100644 index 00000000000..1c7f9cc63fc --- /dev/null +++ b/packages/jsts/src/rules/S2187/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Test files should contain at least one test case', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2187/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2187'; diff --git a/packages/jsts/src/rules/S2187/meta.ts b/packages/jsts/src/rules/S2187/meta.ts index 1c7f9cc63fc..d6c5fc28260 100644 --- a/packages/jsts/src/rules/S2187/meta.ts +++ b/packages/jsts/src/rules/S2187/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Test files should contain at least one test case', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2187/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2187'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-empty-test-file'; diff --git a/packages/jsts/src/rules/S2189/generated-meta.ts b/packages/jsts/src/rules/S2189/generated-meta.ts new file mode 100644 index 00000000000..357fe653819 --- /dev/null +++ b/packages/jsts/src/rules/S2189/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Loops should not be infinite', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2189/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2189'; diff --git a/packages/jsts/src/rules/S2189/meta.ts b/packages/jsts/src/rules/S2189/meta.ts index 357fe653819..b8355829587 100644 --- a/packages/jsts/src/rules/S2189/meta.ts +++ b/packages/jsts/src/rules/S2189/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Loops should not be infinite', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2189/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2189'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-infinite-loop'; diff --git a/packages/jsts/src/rules/S2189/rule.ts b/packages/jsts/src/rules/S2189/rule.ts index c6cebb2da22..996fde054af 100644 --- a/packages/jsts/src/rules/S2189/rule.ts +++ b/packages/jsts/src/rules/S2189/rule.ts @@ -20,7 +20,7 @@ // https://sonarsource.github.io/rspec/#/rspec/S2189/javascript import { Rule, Scope } from 'eslint'; -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import estree from 'estree'; import { childrenOf, @@ -32,7 +32,7 @@ import { import { TSESTree } from '@typescript-eslint/utils'; import { meta } from './meta.js'; -const noUnmodifiedLoopEslint = eslintRules['no-unmodified-loop-condition']; +const noUnmodifiedLoopEslint = getESLintCoreRule('no-unmodified-loop-condition'); export const rule: Rule.RuleModule = { meta: generateMeta(meta as Rule.RuleMetaData, { diff --git a/packages/jsts/src/rules/S2201/generated-meta.ts b/packages/jsts/src/rules/S2201/generated-meta.ts new file mode 100644 index 00000000000..75366df1fe0 --- /dev/null +++ b/packages/jsts/src/rules/S2201/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Return values from functions without side effects should not be ignored', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2201/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S2201'; diff --git a/packages/jsts/src/rules/S2201/meta.ts b/packages/jsts/src/rules/S2201/meta.ts index 75366df1fe0..87b4e61a0e8 100644 --- a/packages/jsts/src/rules/S2201/meta.ts +++ b/packages/jsts/src/rules/S2201/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Return values from functions without side effects should not be ignored', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2201/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S2201'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-ignored-return'; diff --git a/packages/jsts/src/rules/S2208/generated-meta.ts b/packages/jsts/src/rules/S2208/generated-meta.ts new file mode 100644 index 00000000000..b5666c29214 --- /dev/null +++ b/packages/jsts/src/rules/S2208/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Wildcard imports should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2208/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2208'; diff --git a/packages/jsts/src/rules/S2208/meta.ts b/packages/jsts/src/rules/S2208/meta.ts index b5666c29214..73509b17043 100644 --- a/packages/jsts/src/rules/S2208/meta.ts +++ b/packages/jsts/src/rules/S2208/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Wildcard imports should not be used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2208/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2208'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-wildcard-import'; diff --git a/packages/jsts/src/rules/S2234/generated-meta.ts b/packages/jsts/src/rules/S2234/generated-meta.ts new file mode 100644 index 00000000000..e7cfacff05c --- /dev/null +++ b/packages/jsts/src/rules/S2234/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Parameters should be passed in the correct order', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2234/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S2234'; diff --git a/packages/jsts/src/rules/S2234/meta.ts b/packages/jsts/src/rules/S2234/meta.ts index e7cfacff05c..cf6f478858a 100644 --- a/packages/jsts/src/rules/S2234/meta.ts +++ b/packages/jsts/src/rules/S2234/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Parameters should be passed in the correct order', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2234/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S2234'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'arguments-order'; diff --git a/packages/jsts/src/rules/S2245/generated-meta.ts b/packages/jsts/src/rules/S2245/generated-meta.ts new file mode 100644 index 00000000000..8013c689da1 --- /dev/null +++ b/packages/jsts/src/rules/S2245/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Using pseudorandom number generators (PRNGs) is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2245/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2245'; diff --git a/packages/jsts/src/rules/S2245/meta.ts b/packages/jsts/src/rules/S2245/meta.ts index 8013c689da1..b65b35f0c54 100644 --- a/packages/jsts/src/rules/S2245/meta.ts +++ b/packages/jsts/src/rules/S2245/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Using pseudorandom number generators (PRNGs) is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2245/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2245'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'pseudo-random'; diff --git a/packages/jsts/src/rules/S2251/generated-meta.ts b/packages/jsts/src/rules/S2251/generated-meta.ts new file mode 100644 index 00000000000..f4148e2430b --- /dev/null +++ b/packages/jsts/src/rules/S2251/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'A "for" loop update clause should move the counter in the right direction', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2251/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2251'; diff --git a/packages/jsts/src/rules/S2251/meta.ts b/packages/jsts/src/rules/S2251/meta.ts index f4148e2430b..2cccc23fc9e 100644 --- a/packages/jsts/src/rules/S2251/meta.ts +++ b/packages/jsts/src/rules/S2251/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'A "for" loop update clause should move the counter in the right direction', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2251/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2251'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'for-loop-increment-sign'; diff --git a/packages/jsts/src/rules/S2255/generated-meta.ts b/packages/jsts/src/rules/S2255/generated-meta.ts new file mode 100644 index 00000000000..b1fe9412802 --- /dev/null +++ b/packages/jsts/src/rules/S2255/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Writing cookies is security-sensitive', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2255/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S2255'; diff --git a/packages/jsts/src/rules/S2255/meta.ts b/packages/jsts/src/rules/S2255/meta.ts index b1fe9412802..64ebcf6ca0f 100644 --- a/packages/jsts/src/rules/S2255/meta.ts +++ b/packages/jsts/src/rules/S2255/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Writing cookies is security-sensitive', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2255/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S2255'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'cookies'; diff --git a/packages/jsts/src/rules/S2259/generated-meta.ts b/packages/jsts/src/rules/S2259/generated-meta.ts new file mode 100644 index 00000000000..2dbf5c42513 --- /dev/null +++ b/packages/jsts/src/rules/S2259/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Properties of variables with "null" or "undefined" values should not be accessed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2259/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S2259'; diff --git a/packages/jsts/src/rules/S2259/meta.ts b/packages/jsts/src/rules/S2259/meta.ts index 2dbf5c42513..c92be2b5cf4 100644 --- a/packages/jsts/src/rules/S2259/meta.ts +++ b/packages/jsts/src/rules/S2259/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Properties of variables with "null" or "undefined" values should not be accessed', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2259/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S2259'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'null-dereference'; diff --git a/packages/jsts/src/rules/S2301/generated-meta.ts b/packages/jsts/src/rules/S2301/generated-meta.ts new file mode 100644 index 00000000000..a9cef0deb82 --- /dev/null +++ b/packages/jsts/src/rules/S2301/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Methods should not contain selector parameters', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2301/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S2301'; diff --git a/packages/jsts/src/rules/S2301/meta.ts b/packages/jsts/src/rules/S2301/meta.ts index a9cef0deb82..0ef2c2e99af 100644 --- a/packages/jsts/src/rules/S2301/meta.ts +++ b/packages/jsts/src/rules/S2301/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Methods should not contain selector parameters', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2301/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S2301'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-selector-parameter'; diff --git a/packages/jsts/src/rules/S2310/generated-meta.ts b/packages/jsts/src/rules/S2310/generated-meta.ts new file mode 100644 index 00000000000..1177bc855b2 --- /dev/null +++ b/packages/jsts/src/rules/S2310/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Loop counters should not be assigned within the loop body', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2310/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2310'; diff --git a/packages/jsts/src/rules/S2310/meta.ts b/packages/jsts/src/rules/S2310/meta.ts index 1177bc855b2..2e6bb7c23de 100644 --- a/packages/jsts/src/rules/S2310/meta.ts +++ b/packages/jsts/src/rules/S2310/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Loop counters should not be assigned within the loop body', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2310/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2310'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'updated-loop-counter'; diff --git a/packages/jsts/src/rules/S2376/generated-meta.ts b/packages/jsts/src/rules/S2376/generated-meta.ts new file mode 100644 index 00000000000..b8e275c904e --- /dev/null +++ b/packages/jsts/src/rules/S2376/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Property getters and setters should come in pairs', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2376/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2376'; diff --git a/packages/jsts/src/rules/S2376/index.ts b/packages/jsts/src/rules/S2376/index.ts index b0130b280c2..dca61e413c1 100644 --- a/packages/jsts/src/rules/S2376/index.ts +++ b/packages/jsts/src/rules/S2376/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; -export const rule = decorate(eslintRules['accessor-pairs']); +export const rule = decorate(getESLintCoreRule('accessor-pairs')); diff --git a/packages/jsts/src/rules/S2376/meta.ts b/packages/jsts/src/rules/S2376/meta.ts index b8e275c904e..06ee7698acb 100644 --- a/packages/jsts/src/rules/S2376/meta.ts +++ b/packages/jsts/src/rules/S2376/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Property getters and setters should come in pairs', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2376/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2376'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'accessor-pairs'; diff --git a/packages/jsts/src/rules/S2392/generated-meta.ts b/packages/jsts/src/rules/S2392/generated-meta.ts new file mode 100644 index 00000000000..cc5fb3b2c62 --- /dev/null +++ b/packages/jsts/src/rules/S2392/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Variables should be used in the blocks where they are declared', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2392/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2392'; diff --git a/packages/jsts/src/rules/S2392/meta.ts b/packages/jsts/src/rules/S2392/meta.ts index cc5fb3b2c62..cb6b96c3e09 100644 --- a/packages/jsts/src/rules/S2392/meta.ts +++ b/packages/jsts/src/rules/S2392/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Variables should be used in the blocks where they are declared', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2392/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2392'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'block-scoped-var'; diff --git a/packages/jsts/src/rules/S2424/generated-meta.ts b/packages/jsts/src/rules/S2424/generated-meta.ts new file mode 100644 index 00000000000..2b757b27474 --- /dev/null +++ b/packages/jsts/src/rules/S2424/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Built-in objects should not be overridden', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2424/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2424'; diff --git a/packages/jsts/src/rules/S2424/meta.ts b/packages/jsts/src/rules/S2424/meta.ts index 2b757b27474..19144bfedba 100644 --- a/packages/jsts/src/rules/S2424/meta.ts +++ b/packages/jsts/src/rules/S2424/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Built-in objects should not be overridden', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2424/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2424'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-built-in-override'; diff --git a/packages/jsts/src/rules/S2427/generated-meta.ts b/packages/jsts/src/rules/S2427/generated-meta.ts new file mode 100644 index 00000000000..8f7ac720ce3 --- /dev/null +++ b/packages/jsts/src/rules/S2427/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'The base should be provided to "parseInt"', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2427/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S2427'; diff --git a/packages/jsts/src/rules/S2427/index.ts b/packages/jsts/src/rules/S2427/index.ts new file mode 100644 index 00000000000..92f93cb2d0f --- /dev/null +++ b/packages/jsts/src/rules/S2427/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('radix'); diff --git a/packages/jsts/src/rules/S2427/meta.ts b/packages/jsts/src/rules/S2427/meta.ts new file mode 100644 index 00000000000..f27bc2e1e64 --- /dev/null +++ b/packages/jsts/src/rules/S2427/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'radix'; diff --git a/packages/jsts/src/rules/S2428/generated-meta.ts b/packages/jsts/src/rules/S2428/generated-meta.ts new file mode 100644 index 00000000000..19c02264c30 --- /dev/null +++ b/packages/jsts/src/rules/S2428/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Object literal syntax should be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2428/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2428'; diff --git a/packages/jsts/src/rules/S2428/meta.ts b/packages/jsts/src/rules/S2428/meta.ts index 19c02264c30..1009ca1af19 100644 --- a/packages/jsts/src/rules/S2428/meta.ts +++ b/packages/jsts/src/rules/S2428/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Object literal syntax should be used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2428/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2428'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'prefer-object-literal'; diff --git a/packages/jsts/src/rules/S2430/generated-meta.ts b/packages/jsts/src/rules/S2430/generated-meta.ts new file mode 100644 index 00000000000..f75f9935019 --- /dev/null +++ b/packages/jsts/src/rules/S2430/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Constructor names should start with an upper case letter', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2430/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2430'; diff --git a/packages/jsts/src/rules/S2430/index.ts b/packages/jsts/src/rules/S2430/index.ts index 451a385431c..f8e9176874c 100644 --- a/packages/jsts/src/rules/S2430/index.ts +++ b/packages/jsts/src/rules/S2430/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; -export const rule = decorate(eslintRules['new-cap']); +export const rule = decorate(getESLintCoreRule('new-cap')); diff --git a/packages/jsts/src/rules/S2430/meta.ts b/packages/jsts/src/rules/S2430/meta.ts index f75f9935019..3a8dd1d886e 100644 --- a/packages/jsts/src/rules/S2430/meta.ts +++ b/packages/jsts/src/rules/S2430/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Constructor names should start with an upper case letter', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2430/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2430'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'new-cap'; diff --git a/packages/jsts/src/rules/S2432/generated-meta.ts b/packages/jsts/src/rules/S2432/generated-meta.ts new file mode 100644 index 00000000000..f710e02d12e --- /dev/null +++ b/packages/jsts/src/rules/S2432/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Setters should not return values', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2432/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2432'; diff --git a/packages/jsts/src/rules/S2432/index.ts b/packages/jsts/src/rules/S2432/index.ts new file mode 100644 index 00000000000..3f60c2b214c --- /dev/null +++ b/packages/jsts/src/rules/S2432/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-setter-return'); diff --git a/packages/jsts/src/rules/S2432/meta.ts b/packages/jsts/src/rules/S2432/meta.ts new file mode 100644 index 00000000000..ef961f42b79 --- /dev/null +++ b/packages/jsts/src/rules/S2432/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-setter-return'; diff --git a/packages/jsts/src/rules/S2486/generated-meta.ts b/packages/jsts/src/rules/S2486/generated-meta.ts new file mode 100644 index 00000000000..52532b82a5d --- /dev/null +++ b/packages/jsts/src/rules/S2486/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Exceptions should not be ignored', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2486/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2486'; diff --git a/packages/jsts/src/rules/S2486/meta.ts b/packages/jsts/src/rules/S2486/meta.ts index 52532b82a5d..b72dcbc8647 100644 --- a/packages/jsts/src/rules/S2486/meta.ts +++ b/packages/jsts/src/rules/S2486/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Exceptions should not be ignored', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2486/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2486'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-ignored-exceptions'; diff --git a/packages/jsts/src/rules/S2589/generated-meta.ts b/packages/jsts/src/rules/S2589/generated-meta.ts new file mode 100644 index 00000000000..eae1bf2ed77 --- /dev/null +++ b/packages/jsts/src/rules/S2589/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Boolean expressions should not be gratuitous', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2589/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2589'; diff --git a/packages/jsts/src/rules/S2589/meta.ts b/packages/jsts/src/rules/S2589/meta.ts index eae1bf2ed77..2dcc7858b0a 100644 --- a/packages/jsts/src/rules/S2589/meta.ts +++ b/packages/jsts/src/rules/S2589/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Boolean expressions should not be gratuitous', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2589/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2589'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-gratuitous-expressions'; diff --git a/packages/jsts/src/rules/S2598/generated-meta.ts b/packages/jsts/src/rules/S2598/generated-meta.ts new file mode 100644 index 00000000000..6794a083497 --- /dev/null +++ b/packages/jsts/src/rules/S2598/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'File uploads should be restricted', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2598/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2598'; diff --git a/packages/jsts/src/rules/S2598/meta.ts b/packages/jsts/src/rules/S2598/meta.ts index 6794a083497..e4495378c90 100644 --- a/packages/jsts/src/rules/S2598/meta.ts +++ b/packages/jsts/src/rules/S2598/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'File uploads should be restricted', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2598/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2598'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'file-uploads'; diff --git a/packages/jsts/src/rules/S2612/generated-meta.ts b/packages/jsts/src/rules/S2612/generated-meta.ts new file mode 100644 index 00000000000..f868fdea8d5 --- /dev/null +++ b/packages/jsts/src/rules/S2612/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Setting loose POSIX file permissions is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2612/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2612'; diff --git a/packages/jsts/src/rules/S2612/meta.ts b/packages/jsts/src/rules/S2612/meta.ts index f868fdea8d5..01138d96223 100644 --- a/packages/jsts/src/rules/S2612/meta.ts +++ b/packages/jsts/src/rules/S2612/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Setting loose POSIX file permissions is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2612/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2612'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'file-permissions'; diff --git a/packages/jsts/src/rules/S2639/generated-meta.ts b/packages/jsts/src/rules/S2639/generated-meta.ts new file mode 100644 index 00000000000..a6a895bbb7c --- /dev/null +++ b/packages/jsts/src/rules/S2639/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Empty character classes should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2639/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S2639'; diff --git a/packages/jsts/src/rules/S2639/meta.ts b/packages/jsts/src/rules/S2639/meta.ts index a6a895bbb7c..3b593720262 100644 --- a/packages/jsts/src/rules/S2639/meta.ts +++ b/packages/jsts/src/rules/S2639/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Empty character classes should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2639/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S2639'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-empty-character-class'; diff --git a/packages/jsts/src/rules/S2681/generated-meta.ts b/packages/jsts/src/rules/S2681/generated-meta.ts new file mode 100644 index 00000000000..db4bae9ab2a --- /dev/null +++ b/packages/jsts/src/rules/S2681/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Multiline blocks should be enclosed in curly braces', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2681/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2681'; diff --git a/packages/jsts/src/rules/S2681/meta.ts b/packages/jsts/src/rules/S2681/meta.ts index db4bae9ab2a..f0fc971fae0 100644 --- a/packages/jsts/src/rules/S2681/meta.ts +++ b/packages/jsts/src/rules/S2681/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Multiline blocks should be enclosed in curly braces', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2681/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2681'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-unenclosed-multiline-block'; diff --git a/packages/jsts/src/rules/S2685/generated-meta.ts b/packages/jsts/src/rules/S2685/generated-meta.ts new file mode 100644 index 00000000000..ce4442833c9 --- /dev/null +++ b/packages/jsts/src/rules/S2685/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"arguments.caller" and "arguments.callee" should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2685/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2685'; diff --git a/packages/jsts/src/rules/S2685/index.ts b/packages/jsts/src/rules/S2685/index.ts new file mode 100644 index 00000000000..e0d4d18613c --- /dev/null +++ b/packages/jsts/src/rules/S2685/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-caller'); diff --git a/packages/jsts/src/rules/S2685/meta.ts b/packages/jsts/src/rules/S2685/meta.ts new file mode 100644 index 00000000000..e71b251f83c --- /dev/null +++ b/packages/jsts/src/rules/S2685/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-caller'; diff --git a/packages/jsts/src/rules/S2688/generated-meta.ts b/packages/jsts/src/rules/S2688/generated-meta.ts new file mode 100644 index 00000000000..060abf68961 --- /dev/null +++ b/packages/jsts/src/rules/S2688/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"NaN" should not be used in comparisons', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2688/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S2688'; diff --git a/packages/jsts/src/rules/S2688/index.ts b/packages/jsts/src/rules/S2688/index.ts index 518ae4f0b07..394e6c90d0c 100644 --- a/packages/jsts/src/rules/S2688/index.ts +++ b/packages/jsts/src/rules/S2688/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; -export const rule = decorate(eslintRules['use-isnan']); +export const rule = decorate(getESLintCoreRule('use-isnan')); diff --git a/packages/jsts/src/rules/S2688/meta.ts b/packages/jsts/src/rules/S2688/meta.ts index 060abf68961..ed176144936 100644 --- a/packages/jsts/src/rules/S2688/meta.ts +++ b/packages/jsts/src/rules/S2688/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: '"NaN" should not be used in comparisons', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2688/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S2688'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'use-isnan'; diff --git a/packages/jsts/src/rules/S2692/generated-meta.ts b/packages/jsts/src/rules/S2692/generated-meta.ts new file mode 100644 index 00000000000..ffa9fbde1dc --- /dev/null +++ b/packages/jsts/src/rules/S2692/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"indexOf" checks should not be for positive numbers', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2692/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S2692'; diff --git a/packages/jsts/src/rules/S2692/meta.ts b/packages/jsts/src/rules/S2692/meta.ts index ffa9fbde1dc..6d79059c39b 100644 --- a/packages/jsts/src/rules/S2692/meta.ts +++ b/packages/jsts/src/rules/S2692/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"indexOf" checks should not be for positive numbers', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2692/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S2692'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'index-of-compare-to-positive-number'; diff --git a/packages/jsts/src/rules/S2699/generated-meta.ts b/packages/jsts/src/rules/S2699/generated-meta.ts new file mode 100644 index 00000000000..c2e71341449 --- /dev/null +++ b/packages/jsts/src/rules/S2699/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Tests should include assertions', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2699/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2699'; diff --git a/packages/jsts/src/rules/S2699/meta.ts b/packages/jsts/src/rules/S2699/meta.ts index c2e71341449..721892c069f 100644 --- a/packages/jsts/src/rules/S2699/meta.ts +++ b/packages/jsts/src/rules/S2699/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Tests should include assertions', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2699/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2699'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'assertions-in-tests'; diff --git a/packages/jsts/src/rules/S2703/generated-meta.ts b/packages/jsts/src/rules/S2703/generated-meta.ts new file mode 100644 index 00000000000..d466d0f65c5 --- /dev/null +++ b/packages/jsts/src/rules/S2703/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Variables should be declared explicitly', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2703/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2703'; diff --git a/packages/jsts/src/rules/S2703/meta.ts b/packages/jsts/src/rules/S2703/meta.ts index d466d0f65c5..d049934ef09 100644 --- a/packages/jsts/src/rules/S2703/meta.ts +++ b/packages/jsts/src/rules/S2703/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Variables should be declared explicitly', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2703/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2703'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-implicit-global'; diff --git a/packages/jsts/src/rules/S2737/generated-meta.ts b/packages/jsts/src/rules/S2737/generated-meta.ts new file mode 100644 index 00000000000..8edf6a17e09 --- /dev/null +++ b/packages/jsts/src/rules/S2737/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"catch" clauses should do more than rethrow', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2737/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2737'; diff --git a/packages/jsts/src/rules/S2737/meta.ts b/packages/jsts/src/rules/S2737/meta.ts index 8edf6a17e09..3ba5f44eac2 100644 --- a/packages/jsts/src/rules/S2737/meta.ts +++ b/packages/jsts/src/rules/S2737/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"catch" clauses should do more than rethrow', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2737/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2737'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-useless-catch'; diff --git a/packages/jsts/src/rules/S2755/generated-meta.ts b/packages/jsts/src/rules/S2755/generated-meta.ts new file mode 100644 index 00000000000..63cd000d2cb --- /dev/null +++ b/packages/jsts/src/rules/S2755/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'XML parsers should not be vulnerable to XXE attacks', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2755/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2755'; diff --git a/packages/jsts/src/rules/S2755/meta.ts b/packages/jsts/src/rules/S2755/meta.ts index 63cd000d2cb..b4e203ecf62 100644 --- a/packages/jsts/src/rules/S2755/meta.ts +++ b/packages/jsts/src/rules/S2755/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'XML parsers should not be vulnerable to XXE attacks', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2755/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2755'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'xml-parser-xxe'; diff --git a/packages/jsts/src/rules/S2757/generated-meta.ts b/packages/jsts/src/rules/S2757/generated-meta.ts new file mode 100644 index 00000000000..a7847d1d55a --- /dev/null +++ b/packages/jsts/src/rules/S2757/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: "Non-existent operators '=+', '=-' and '=!' should not be used", + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2757/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S2757'; diff --git a/packages/jsts/src/rules/S2757/meta.ts b/packages/jsts/src/rules/S2757/meta.ts index a7847d1d55a..bd28e821446 100644 --- a/packages/jsts/src/rules/S2757/meta.ts +++ b/packages/jsts/src/rules/S2757/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: "Non-existent operators '=+', '=-' and '=!' should not be used", - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2757/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S2757'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'non-existent-operator'; diff --git a/packages/jsts/src/rules/S2814/generated-meta.ts b/packages/jsts/src/rules/S2814/generated-meta.ts new file mode 100644 index 00000000000..860ea174157 --- /dev/null +++ b/packages/jsts/src/rules/S2814/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Variables and functions should not be redeclared', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2814/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2814'; diff --git a/packages/jsts/src/rules/S2814/index.ts b/packages/jsts/src/rules/S2814/index.ts index 2532f41ae80..bd0ba5cc530 100644 --- a/packages/jsts/src/rules/S2814/index.ts +++ b/packages/jsts/src/rules/S2814/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { decorate } from './decorator.js'; export const rule = decorate(tsEslintRules['no-redeclare']); diff --git a/packages/jsts/src/rules/S2814/meta.ts b/packages/jsts/src/rules/S2814/meta.ts index 860ea174157..511c20c2839 100644 --- a/packages/jsts/src/rules/S2814/meta.ts +++ b/packages/jsts/src/rules/S2814/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Variables and functions should not be redeclared', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2814/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2814'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-redeclare'; diff --git a/packages/jsts/src/rules/S2817/generated-meta.ts b/packages/jsts/src/rules/S2817/generated-meta.ts new file mode 100644 index 00000000000..e48bc2b6948 --- /dev/null +++ b/packages/jsts/src/rules/S2817/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Web SQL databases should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2817/javascript', + requiresTypeChecking: true, + }, + deprecated: true, +}; + +export const sonarKey = 'S2817'; diff --git a/packages/jsts/src/rules/S2817/meta.ts b/packages/jsts/src/rules/S2817/meta.ts index e48bc2b6948..634f5c003e0 100644 --- a/packages/jsts/src/rules/S2817/meta.ts +++ b/packages/jsts/src/rules/S2817/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Web SQL databases should not be used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2817/javascript', - requiresTypeChecking: true, - }, - deprecated: true, -}; - -export const sonarKey = 'S2817'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'web-sql-database'; diff --git a/packages/jsts/src/rules/S2819/generated-meta.ts b/packages/jsts/src/rules/S2819/generated-meta.ts new file mode 100644 index 00000000000..329a5affdb6 --- /dev/null +++ b/packages/jsts/src/rules/S2819/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Origins should be verified during cross-origin communications', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2819/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S2819'; diff --git a/packages/jsts/src/rules/S2819/meta.ts b/packages/jsts/src/rules/S2819/meta.ts index 329a5affdb6..3126b80c43f 100644 --- a/packages/jsts/src/rules/S2819/meta.ts +++ b/packages/jsts/src/rules/S2819/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Origins should be verified during cross-origin communications', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2819/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S2819'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'post-message'; diff --git a/packages/jsts/src/rules/S2870/generated-meta.ts b/packages/jsts/src/rules/S2870/generated-meta.ts new file mode 100644 index 00000000000..14d5dd80247 --- /dev/null +++ b/packages/jsts/src/rules/S2870/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"delete" should not be used on arrays', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2870/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S2870'; diff --git a/packages/jsts/src/rules/S2870/meta.ts b/packages/jsts/src/rules/S2870/meta.ts index 14d5dd80247..d8148f9a840 100644 --- a/packages/jsts/src/rules/S2870/meta.ts +++ b/packages/jsts/src/rules/S2870/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"delete" should not be used on arrays', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2870/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S2870'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-array-delete'; diff --git a/packages/jsts/src/rules/S2871/generated-meta.ts b/packages/jsts/src/rules/S2871/generated-meta.ts new file mode 100644 index 00000000000..d2edaf6b2e6 --- /dev/null +++ b/packages/jsts/src/rules/S2871/generated-meta.ts @@ -0,0 +1,35 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: + '"Array.prototype.sort()" and "Array.prototype.toSorted()" should use a compare function', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2871/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S2871'; diff --git a/packages/jsts/src/rules/S2871/meta.ts b/packages/jsts/src/rules/S2871/meta.ts index d2edaf6b2e6..8fe22e73908 100644 --- a/packages/jsts/src/rules/S2871/meta.ts +++ b/packages/jsts/src/rules/S2871/meta.ts @@ -17,19 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: - '"Array.prototype.sort()" and "Array.prototype.toSorted()" should use a compare function', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2871/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S2871'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-alphabetical-sort'; diff --git a/packages/jsts/src/rules/S2933/generated-meta.ts b/packages/jsts/src/rules/S2933/generated-meta.ts new file mode 100644 index 00000000000..a10b62a32be --- /dev/null +++ b/packages/jsts/src/rules/S2933/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Fields that are only assigned in the constructor should be "readonly"', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2933/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S2933'; diff --git a/packages/jsts/src/rules/S2933/index.ts b/packages/jsts/src/rules/S2933/index.ts new file mode 100644 index 00000000000..8c2d6f834a2 --- /dev/null +++ b/packages/jsts/src/rules/S2933/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['prefer-readonly']; diff --git a/packages/jsts/src/rules/S2933/meta.ts b/packages/jsts/src/rules/S2933/meta.ts new file mode 100644 index 00000000000..4d88eeea8ec --- /dev/null +++ b/packages/jsts/src/rules/S2933/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'prefer-readonly'; diff --git a/packages/jsts/src/rules/S2966/generated-meta.ts b/packages/jsts/src/rules/S2966/generated-meta.ts new file mode 100644 index 00000000000..a95cfe0fe45 --- /dev/null +++ b/packages/jsts/src/rules/S2966/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Non-null assertions should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2966/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S2966'; diff --git a/packages/jsts/src/rules/S2966/index.ts b/packages/jsts/src/rules/S2966/index.ts new file mode 100644 index 00000000000..fcdb748b1df --- /dev/null +++ b/packages/jsts/src/rules/S2966/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['no-non-null-assertion']; diff --git a/packages/jsts/src/rules/S2966/meta.ts b/packages/jsts/src/rules/S2966/meta.ts new file mode 100644 index 00000000000..3b42ed6a510 --- /dev/null +++ b/packages/jsts/src/rules/S2966/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-non-null-assertion'; diff --git a/packages/jsts/src/rules/S2970/generated-meta.ts b/packages/jsts/src/rules/S2970/generated-meta.ts new file mode 100644 index 00000000000..e06a83faa30 --- /dev/null +++ b/packages/jsts/src/rules/S2970/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Assertions should be complete', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2970/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S2970'; diff --git a/packages/jsts/src/rules/S2970/meta.ts b/packages/jsts/src/rules/S2970/meta.ts index e06a83faa30..82c92ee7fcb 100644 --- a/packages/jsts/src/rules/S2970/meta.ts +++ b/packages/jsts/src/rules/S2970/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Assertions should be complete', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2970/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S2970'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-incomplete-assertions'; diff --git a/packages/jsts/src/rules/S2990/generated-meta.ts b/packages/jsts/src/rules/S2990/generated-meta.ts new file mode 100644 index 00000000000..2b24f53d0d9 --- /dev/null +++ b/packages/jsts/src/rules/S2990/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'The global "this" object should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2990/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S2990'; diff --git a/packages/jsts/src/rules/S2990/meta.ts b/packages/jsts/src/rules/S2990/meta.ts index 2b24f53d0d9..d566ad6745c 100644 --- a/packages/jsts/src/rules/S2990/meta.ts +++ b/packages/jsts/src/rules/S2990/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'The global "this" object should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2990/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S2990'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-global-this'; diff --git a/packages/jsts/src/rules/S2999/generated-meta.ts b/packages/jsts/src/rules/S2999/generated-meta.ts new file mode 100644 index 00000000000..eef6f45614e --- /dev/null +++ b/packages/jsts/src/rules/S2999/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"new" should only be used with functions and classes', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S2999/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S2999'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 2, + items: [ + { + type: 'object', + properties: { + considerJSDoc: { + type: 'boolean', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S2999/meta.ts b/packages/jsts/src/rules/S2999/meta.ts index eef6f45614e..5c4631ebdbc 100644 --- a/packages/jsts/src/rules/S2999/meta.ts +++ b/packages/jsts/src/rules/S2999/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: '"new" should only be used with functions and classes', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S2999/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S2999'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 2, - items: [ - { - type: 'object', - properties: { - considerJSDoc: { - type: 'boolean', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'new-operator-misuse'; diff --git a/packages/jsts/src/rules/S3001/generated-meta.ts b/packages/jsts/src/rules/S3001/generated-meta.ts new file mode 100644 index 00000000000..4e06437d3b4 --- /dev/null +++ b/packages/jsts/src/rules/S3001/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"delete" should be used only with object properties', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3001/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3001'; diff --git a/packages/jsts/src/rules/S3001/meta.ts b/packages/jsts/src/rules/S3001/meta.ts index 4e06437d3b4..33d94e811e8 100644 --- a/packages/jsts/src/rules/S3001/meta.ts +++ b/packages/jsts/src/rules/S3001/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: '"delete" should be used only with object properties', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3001/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3001'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-delete-var'; diff --git a/packages/jsts/src/rules/S3003/generated-meta.ts b/packages/jsts/src/rules/S3003/generated-meta.ts new file mode 100644 index 00000000000..b805ad95e2a --- /dev/null +++ b/packages/jsts/src/rules/S3003/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Comparison operators should not be used with strings', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3003/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3003'; diff --git a/packages/jsts/src/rules/S3003/meta.ts b/packages/jsts/src/rules/S3003/meta.ts index b805ad95e2a..9d05e071e39 100644 --- a/packages/jsts/src/rules/S3003/meta.ts +++ b/packages/jsts/src/rules/S3003/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Comparison operators should not be used with strings', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3003/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3003'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'strings-comparison'; diff --git a/packages/jsts/src/rules/S3257/generated-meta.ts b/packages/jsts/src/rules/S3257/generated-meta.ts new file mode 100644 index 00000000000..1b209dd0c1c --- /dev/null +++ b/packages/jsts/src/rules/S3257/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Primitive types should be omitted from initialized or defaulted declarations', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3257/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3257'; diff --git a/packages/jsts/src/rules/S3257/index.ts b/packages/jsts/src/rules/S3257/index.ts new file mode 100644 index 00000000000..b7902cc3026 --- /dev/null +++ b/packages/jsts/src/rules/S3257/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['no-inferrable-types']; diff --git a/packages/jsts/src/rules/S3257/meta.ts b/packages/jsts/src/rules/S3257/meta.ts new file mode 100644 index 00000000000..508abd47ec3 --- /dev/null +++ b/packages/jsts/src/rules/S3257/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-inferrable-types'; diff --git a/packages/jsts/src/rules/S3317/generated-meta.ts b/packages/jsts/src/rules/S3317/generated-meta.ts new file mode 100644 index 00000000000..b529745e887 --- /dev/null +++ b/packages/jsts/src/rules/S3317/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Default export names and file names should match', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3317/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3317'; diff --git a/packages/jsts/src/rules/S3317/meta.ts b/packages/jsts/src/rules/S3317/meta.ts index b529745e887..f07a83ffc26 100644 --- a/packages/jsts/src/rules/S3317/meta.ts +++ b/packages/jsts/src/rules/S3317/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Default export names and file names should match', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3317/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3317'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'file-name-differ-from-class'; diff --git a/packages/jsts/src/rules/S3330/generated-meta.ts b/packages/jsts/src/rules/S3330/generated-meta.ts new file mode 100644 index 00000000000..f74a2265fe4 --- /dev/null +++ b/packages/jsts/src/rules/S3330/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Creating cookies without the "HttpOnly" flag is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3330/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3330'; diff --git a/packages/jsts/src/rules/S3330/meta.ts b/packages/jsts/src/rules/S3330/meta.ts index f74a2265fe4..71b8a10c348 100644 --- a/packages/jsts/src/rules/S3330/meta.ts +++ b/packages/jsts/src/rules/S3330/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Creating cookies without the "HttpOnly" flag is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3330/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3330'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'cookie-no-httponly'; diff --git a/packages/jsts/src/rules/S3353/generated-meta.ts b/packages/jsts/src/rules/S3353/generated-meta.ts new file mode 100644 index 00000000000..7f25c5e0299 --- /dev/null +++ b/packages/jsts/src/rules/S3353/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Unchanged variables should be marked as "const"', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3353/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3353'; diff --git a/packages/jsts/src/rules/S3353/index.ts b/packages/jsts/src/rules/S3353/index.ts new file mode 100644 index 00000000000..48ae02c4026 --- /dev/null +++ b/packages/jsts/src/rules/S3353/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('prefer-const'); diff --git a/packages/jsts/src/rules/S3353/meta.ts b/packages/jsts/src/rules/S3353/meta.ts new file mode 100644 index 00000000000..fba6b46aa78 --- /dev/null +++ b/packages/jsts/src/rules/S3353/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'prefer-const'; diff --git a/packages/jsts/src/rules/S3358/generated-meta.ts b/packages/jsts/src/rules/S3358/generated-meta.ts new file mode 100644 index 00000000000..0ef5b048294 --- /dev/null +++ b/packages/jsts/src/rules/S3358/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Ternary operators should not be nested', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3358/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3358'; diff --git a/packages/jsts/src/rules/S3358/meta.ts b/packages/jsts/src/rules/S3358/meta.ts index 0ef5b048294..8574cfa04d0 100644 --- a/packages/jsts/src/rules/S3358/meta.ts +++ b/packages/jsts/src/rules/S3358/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Ternary operators should not be nested', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3358/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3358'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-nested-conditional'; diff --git a/packages/jsts/src/rules/S3402/generated-meta.ts b/packages/jsts/src/rules/S3402/generated-meta.ts new file mode 100644 index 00000000000..e93f0283eae --- /dev/null +++ b/packages/jsts/src/rules/S3402/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Strings and non-strings should not be added', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3402/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3402'; diff --git a/packages/jsts/src/rules/S3402/meta.ts b/packages/jsts/src/rules/S3402/meta.ts index e93f0283eae..f7ab6026909 100644 --- a/packages/jsts/src/rules/S3402/meta.ts +++ b/packages/jsts/src/rules/S3402/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Strings and non-strings should not be added', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3402/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3402'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-incorrect-string-concat'; diff --git a/packages/jsts/src/rules/S3403/generated-meta.ts b/packages/jsts/src/rules/S3403/generated-meta.ts new file mode 100644 index 00000000000..b6a38d20b10 --- /dev/null +++ b/packages/jsts/src/rules/S3403/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Strict equality operators should not be used with dissimilar types', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3403/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3403'; diff --git a/packages/jsts/src/rules/S3403/meta.ts b/packages/jsts/src/rules/S3403/meta.ts index b6a38d20b10..8806fcc7381 100644 --- a/packages/jsts/src/rules/S3403/meta.ts +++ b/packages/jsts/src/rules/S3403/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Strict equality operators should not be used with dissimilar types', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3403/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S3403'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'different-types-comparison'; diff --git a/packages/jsts/src/rules/S3415/generated-meta.ts b/packages/jsts/src/rules/S3415/generated-meta.ts new file mode 100644 index 00000000000..6be6ee287c2 --- /dev/null +++ b/packages/jsts/src/rules/S3415/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Assertion arguments should be passed in the correct order', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3415/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3415'; diff --git a/packages/jsts/src/rules/S3415/meta.ts b/packages/jsts/src/rules/S3415/meta.ts index 6be6ee287c2..bcb05b183c3 100644 --- a/packages/jsts/src/rules/S3415/meta.ts +++ b/packages/jsts/src/rules/S3415/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Assertion arguments should be passed in the correct order', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3415/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S3415'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'inverted-assertion-arguments'; diff --git a/packages/jsts/src/rules/S3498/generated-meta.ts b/packages/jsts/src/rules/S3498/generated-meta.ts new file mode 100644 index 00000000000..8a8c92d88b1 --- /dev/null +++ b/packages/jsts/src/rules/S3498/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Object literal shorthand syntax should be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3498/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3498'; diff --git a/packages/jsts/src/rules/S3498/index.ts b/packages/jsts/src/rules/S3498/index.ts index 166b40718f7..8eab2fc40d9 100644 --- a/packages/jsts/src/rules/S3498/index.ts +++ b/packages/jsts/src/rules/S3498/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; -export const rule = decorate(eslintRules['object-shorthand']); +export const rule = decorate(getESLintCoreRule('object-shorthand')); diff --git a/packages/jsts/src/rules/S3498/meta.ts b/packages/jsts/src/rules/S3498/meta.ts index 8a8c92d88b1..9c6b471f9e5 100644 --- a/packages/jsts/src/rules/S3498/meta.ts +++ b/packages/jsts/src/rules/S3498/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Object literal shorthand syntax should be used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3498/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S3498'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'object-shorthand'; diff --git a/packages/jsts/src/rules/S3499/generated-meta.ts b/packages/jsts/src/rules/S3499/generated-meta.ts new file mode 100644 index 00000000000..94b316f7129 --- /dev/null +++ b/packages/jsts/src/rules/S3499/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: + 'Shorthand object properties should be grouped at the beginning or end of an object declaration', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3499/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3499'; diff --git a/packages/jsts/src/rules/S3499/meta.ts b/packages/jsts/src/rules/S3499/meta.ts index 94b316f7129..59211823176 100644 --- a/packages/jsts/src/rules/S3499/meta.ts +++ b/packages/jsts/src/rules/S3499/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: - 'Shorthand object properties should be grouped at the beginning or end of an object declaration', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3499/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3499'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'shorthand-property-grouping'; diff --git a/packages/jsts/src/rules/S3500/generated-meta.ts b/packages/jsts/src/rules/S3500/generated-meta.ts new file mode 100644 index 00000000000..a271b7b1e01 --- /dev/null +++ b/packages/jsts/src/rules/S3500/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"const" variables should not be reassigned', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3500/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3500'; diff --git a/packages/jsts/src/rules/S3500/meta.ts b/packages/jsts/src/rules/S3500/meta.ts index a271b7b1e01..ecbd0f20d8c 100644 --- a/packages/jsts/src/rules/S3500/meta.ts +++ b/packages/jsts/src/rules/S3500/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: '"const" variables should not be reassigned', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3500/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3500'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'updated-const-var'; diff --git a/packages/jsts/src/rules/S3504/generated-meta.ts b/packages/jsts/src/rules/S3504/generated-meta.ts new file mode 100644 index 00000000000..aeda662d14c --- /dev/null +++ b/packages/jsts/src/rules/S3504/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Variables should be declared with "let" or "const"', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3504/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3504'; diff --git a/packages/jsts/src/rules/S3504/index.ts b/packages/jsts/src/rules/S3504/index.ts index 265ab301e69..18f059e60a9 100644 --- a/packages/jsts/src/rules/S3504/index.ts +++ b/packages/jsts/src/rules/S3504/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; -export const rule = decorate(eslintRules['no-var']); +export const rule = decorate(getESLintCoreRule('no-var')); diff --git a/packages/jsts/src/rules/S3504/meta.ts b/packages/jsts/src/rules/S3504/meta.ts index aeda662d14c..626d49b4c9f 100644 --- a/packages/jsts/src/rules/S3504/meta.ts +++ b/packages/jsts/src/rules/S3504/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Variables should be declared with "let" or "const"', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3504/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S3504'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-var'; diff --git a/packages/jsts/src/rules/S3512/generated-meta.ts b/packages/jsts/src/rules/S3512/generated-meta.ts new file mode 100644 index 00000000000..a57e38993d7 --- /dev/null +++ b/packages/jsts/src/rules/S3512/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Template strings should be used instead of concatenation', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3512/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3512'; diff --git a/packages/jsts/src/rules/S3512/index.ts b/packages/jsts/src/rules/S3512/index.ts index 90ebaf6747e..b4f9a98c56b 100644 --- a/packages/jsts/src/rules/S3512/index.ts +++ b/packages/jsts/src/rules/S3512/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; -export const rule = decorate(eslintRules['prefer-template']); +export const rule = decorate(getESLintCoreRule('prefer-template')); diff --git a/packages/jsts/src/rules/S3512/meta.ts b/packages/jsts/src/rules/S3512/meta.ts index a57e38993d7..f8ae2304714 100644 --- a/packages/jsts/src/rules/S3512/meta.ts +++ b/packages/jsts/src/rules/S3512/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Template strings should be used instead of concatenation', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3512/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S3512'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'prefer-template'; diff --git a/packages/jsts/src/rules/S3513/generated-meta.ts b/packages/jsts/src/rules/S3513/generated-meta.ts new file mode 100644 index 00000000000..6e5c45e57c9 --- /dev/null +++ b/packages/jsts/src/rules/S3513/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"arguments" should not be accessed directly', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3513/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3513'; diff --git a/packages/jsts/src/rules/S3513/meta.ts b/packages/jsts/src/rules/S3513/meta.ts index 6e5c45e57c9..b35fec037a3 100644 --- a/packages/jsts/src/rules/S3513/meta.ts +++ b/packages/jsts/src/rules/S3513/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"arguments" should not be accessed directly', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3513/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3513'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'arguments-usage'; diff --git a/packages/jsts/src/rules/S3514/generated-meta.ts b/packages/jsts/src/rules/S3514/generated-meta.ts new file mode 100644 index 00000000000..b94967c0d8b --- /dev/null +++ b/packages/jsts/src/rules/S3514/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Destructuring syntax should be used for assignments', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3514/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3514'; diff --git a/packages/jsts/src/rules/S3514/meta.ts b/packages/jsts/src/rules/S3514/meta.ts index b94967c0d8b..b2bd3a34085 100644 --- a/packages/jsts/src/rules/S3514/meta.ts +++ b/packages/jsts/src/rules/S3514/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Destructuring syntax should be used for assignments', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3514/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3514'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'destructuring-assignment-syntax'; diff --git a/packages/jsts/src/rules/S3516/generated-meta.ts b/packages/jsts/src/rules/S3516/generated-meta.ts new file mode 100644 index 00000000000..2a9dede978d --- /dev/null +++ b/packages/jsts/src/rules/S3516/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Function returns should not be invariant', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3516/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3516'; diff --git a/packages/jsts/src/rules/S3516/meta.ts b/packages/jsts/src/rules/S3516/meta.ts index 2a9dede978d..b7711b3512f 100644 --- a/packages/jsts/src/rules/S3516/meta.ts +++ b/packages/jsts/src/rules/S3516/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Function returns should not be invariant', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3516/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3516'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-invariant-returns'; diff --git a/packages/jsts/src/rules/S3523/generated-meta.ts b/packages/jsts/src/rules/S3523/generated-meta.ts new file mode 100644 index 00000000000..2b3797c5db2 --- /dev/null +++ b/packages/jsts/src/rules/S3523/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Function constructors should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3523/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S3523'; diff --git a/packages/jsts/src/rules/S3523/index.ts b/packages/jsts/src/rules/S3523/index.ts new file mode 100644 index 00000000000..1ce5a91c6cf --- /dev/null +++ b/packages/jsts/src/rules/S3523/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-new-func'); diff --git a/packages/jsts/src/rules/S3523/meta.ts b/packages/jsts/src/rules/S3523/meta.ts new file mode 100644 index 00000000000..6fe5f13eaca --- /dev/null +++ b/packages/jsts/src/rules/S3523/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-new-func'; diff --git a/packages/jsts/src/rules/S3524/generated-meta.ts b/packages/jsts/src/rules/S3524/generated-meta.ts new file mode 100644 index 00000000000..4331dc0c797 --- /dev/null +++ b/packages/jsts/src/rules/S3524/generated-meta.ts @@ -0,0 +1,53 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Braces and parentheses should be used consistently with arrow functions', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3524/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3524'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + requireParameterParentheses: { + type: 'boolean', + }, + requireBodyBraces: { + type: 'boolean', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S3524/meta.ts b/packages/jsts/src/rules/S3524/meta.ts index 4331dc0c797..5c24457b1bb 100644 --- a/packages/jsts/src/rules/S3524/meta.ts +++ b/packages/jsts/src/rules/S3524/meta.ts @@ -17,37 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Braces and parentheses should be used consistently with arrow functions', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3524/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3524'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - requireParameterParentheses: { - type: 'boolean', - }, - requireBodyBraces: { - type: 'boolean', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'arrow-function-convention'; diff --git a/packages/jsts/src/rules/S3525/generated-meta.ts b/packages/jsts/src/rules/S3525/generated-meta.ts new file mode 100644 index 00000000000..75a41f61ec1 --- /dev/null +++ b/packages/jsts/src/rules/S3525/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Class methods should be used instead of "prototype" assignments', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3525/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3525'; diff --git a/packages/jsts/src/rules/S3525/meta.ts b/packages/jsts/src/rules/S3525/meta.ts index 75a41f61ec1..d256cf6767d 100644 --- a/packages/jsts/src/rules/S3525/meta.ts +++ b/packages/jsts/src/rules/S3525/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Class methods should be used instead of "prototype" assignments', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3525/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3525'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'class-prototype'; diff --git a/packages/jsts/src/rules/S3531/generated-meta.ts b/packages/jsts/src/rules/S3531/generated-meta.ts new file mode 100644 index 00000000000..b8fc958105e --- /dev/null +++ b/packages/jsts/src/rules/S3531/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Generators should explicitly "yield" a value', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3531/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3531'; diff --git a/packages/jsts/src/rules/S3531/meta.ts b/packages/jsts/src/rules/S3531/meta.ts index b8fc958105e..29752e24334 100644 --- a/packages/jsts/src/rules/S3531/meta.ts +++ b/packages/jsts/src/rules/S3531/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Generators should explicitly "yield" a value', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3531/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3531'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'generator-without-yield'; diff --git a/packages/jsts/src/rules/S3533/generated-meta.ts b/packages/jsts/src/rules/S3533/generated-meta.ts new file mode 100644 index 00000000000..557636f0e59 --- /dev/null +++ b/packages/jsts/src/rules/S3533/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"import" should be used to include external code', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3533/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3533'; diff --git a/packages/jsts/src/rules/S3533/meta.ts b/packages/jsts/src/rules/S3533/meta.ts index 557636f0e59..5872f475c2e 100644 --- a/packages/jsts/src/rules/S3533/meta.ts +++ b/packages/jsts/src/rules/S3533/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"import" should be used to include external code', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3533/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3533'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-require-or-define'; diff --git a/packages/jsts/src/rules/S3579/generated-meta.ts b/packages/jsts/src/rules/S3579/generated-meta.ts new file mode 100644 index 00000000000..84b73f25f10 --- /dev/null +++ b/packages/jsts/src/rules/S3579/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Array indexes should be numeric', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3579/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3579'; diff --git a/packages/jsts/src/rules/S3579/meta.ts b/packages/jsts/src/rules/S3579/meta.ts index 84b73f25f10..fd2bade825c 100644 --- a/packages/jsts/src/rules/S3579/meta.ts +++ b/packages/jsts/src/rules/S3579/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Array indexes should be numeric', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3579/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3579'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-associative-arrays'; diff --git a/packages/jsts/src/rules/S3616/generated-meta.ts b/packages/jsts/src/rules/S3616/generated-meta.ts new file mode 100644 index 00000000000..34548b0ec04 --- /dev/null +++ b/packages/jsts/src/rules/S3616/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Comma and logical OR operators should not be used in switch cases', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3616/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3616'; diff --git a/packages/jsts/src/rules/S3616/meta.ts b/packages/jsts/src/rules/S3616/meta.ts index 34548b0ec04..9d25d1f89d1 100644 --- a/packages/jsts/src/rules/S3616/meta.ts +++ b/packages/jsts/src/rules/S3616/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Comma and logical OR operators should not be used in switch cases', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3616/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3616'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'comma-or-logical-or-case'; diff --git a/packages/jsts/src/rules/S3626/generated-meta.ts b/packages/jsts/src/rules/S3626/generated-meta.ts new file mode 100644 index 00000000000..4880031c975 --- /dev/null +++ b/packages/jsts/src/rules/S3626/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Jump statements should not be redundant', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3626/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3626'; diff --git a/packages/jsts/src/rules/S3626/meta.ts b/packages/jsts/src/rules/S3626/meta.ts index 4880031c975..ea4d228d3a5 100644 --- a/packages/jsts/src/rules/S3626/meta.ts +++ b/packages/jsts/src/rules/S3626/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Jump statements should not be redundant', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3626/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S3626'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-redundant-jump'; diff --git a/packages/jsts/src/rules/S3686/generated-meta.ts b/packages/jsts/src/rules/S3686/generated-meta.ts new file mode 100644 index 00000000000..c36b304ed0f --- /dev/null +++ b/packages/jsts/src/rules/S3686/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Functions should be called consistently with or without "new"', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3686/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3686'; diff --git a/packages/jsts/src/rules/S3686/meta.ts b/packages/jsts/src/rules/S3686/meta.ts index c36b304ed0f..0e2e94e8ade 100644 --- a/packages/jsts/src/rules/S3686/meta.ts +++ b/packages/jsts/src/rules/S3686/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Functions should be called consistently with or without "new"', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3686/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3686'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'inconsistent-function-call'; diff --git a/packages/jsts/src/rules/S3696/generated-meta.ts b/packages/jsts/src/rules/S3696/generated-meta.ts new file mode 100644 index 00000000000..15f47294d2c --- /dev/null +++ b/packages/jsts/src/rules/S3696/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Literals should not be thrown', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3696/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3696'; diff --git a/packages/jsts/src/rules/S3696/index.ts b/packages/jsts/src/rules/S3696/index.ts index 00f62795919..db5c6802f18 100644 --- a/packages/jsts/src/rules/S3696/index.ts +++ b/packages/jsts/src/rules/S3696/index.ts @@ -17,11 +17,11 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; /** * TypeScript ESLint implementation of 'no-throw-literal' does not support JavaScript code. * Therefore, we decorate ESLint's implemention of the rule. */ -export const rule = decorate(eslintRules['no-throw-literal']); +export const rule = decorate(getESLintCoreRule('no-throw-literal')); diff --git a/packages/jsts/src/rules/S3696/meta.ts b/packages/jsts/src/rules/S3696/meta.ts index 15f47294d2c..ede963306b1 100644 --- a/packages/jsts/src/rules/S3696/meta.ts +++ b/packages/jsts/src/rules/S3696/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Literals should not be thrown', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3696/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S3696'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-throw-literal'; diff --git a/packages/jsts/src/rules/S3699/generated-meta.ts b/packages/jsts/src/rules/S3699/generated-meta.ts new file mode 100644 index 00000000000..2b32c9f45b0 --- /dev/null +++ b/packages/jsts/src/rules/S3699/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'The return value of void functions should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3699/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3699'; diff --git a/packages/jsts/src/rules/S3699/meta.ts b/packages/jsts/src/rules/S3699/meta.ts index 2b32c9f45b0..42eb5068fdb 100644 --- a/packages/jsts/src/rules/S3699/meta.ts +++ b/packages/jsts/src/rules/S3699/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'The return value of void functions should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3699/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3699'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-use-of-empty-return-value'; diff --git a/packages/jsts/src/rules/S3723/generated-meta.ts b/packages/jsts/src/rules/S3723/generated-meta.ts new file mode 100644 index 00000000000..b357b579255 --- /dev/null +++ b/packages/jsts/src/rules/S3723/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Trailing commas should be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3723/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S3723'; diff --git a/packages/jsts/src/rules/S3723/meta.ts b/packages/jsts/src/rules/S3723/meta.ts index b357b579255..581ee7a4bc8 100644 --- a/packages/jsts/src/rules/S3723/meta.ts +++ b/packages/jsts/src/rules/S3723/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Trailing commas should be used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3723/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S3723'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'enforce-trailing-comma'; diff --git a/packages/jsts/src/rules/S3723/rule.ts b/packages/jsts/src/rules/S3723/rule.ts index 87f7612bc61..ae38555fa7d 100644 --- a/packages/jsts/src/rules/S3723/rule.ts +++ b/packages/jsts/src/rules/S3723/rule.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S3723/javascript -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { generateMeta } from '../helpers/index.js'; import { meta } from './meta.js'; import type { Rule } from 'eslint'; @@ -29,6 +29,6 @@ import type { Rule } from 'eslint'; * same ESLint implementation, but the plugin doesn't allow rule key duplicates. */ export const rule = { - ...eslintRules['comma-dangle'], - meta: generateMeta(meta as Rule.RuleMetaData, eslintRules['comma-dangle'].meta), + ...getESLintCoreRule('comma-dangle'), + meta: generateMeta(meta as Rule.RuleMetaData, getESLintCoreRule('comma-dangle').meta), }; diff --git a/packages/jsts/src/rules/S3735/generated-meta.ts b/packages/jsts/src/rules/S3735/generated-meta.ts new file mode 100644 index 00000000000..ebe535c8c7c --- /dev/null +++ b/packages/jsts/src/rules/S3735/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"void" should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3735/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3735'; diff --git a/packages/jsts/src/rules/S3735/meta.ts b/packages/jsts/src/rules/S3735/meta.ts index ebe535c8c7c..6467d676421 100644 --- a/packages/jsts/src/rules/S3735/meta.ts +++ b/packages/jsts/src/rules/S3735/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"void" should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3735/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3735'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'void-use'; diff --git a/packages/jsts/src/rules/S3757/generated-meta.ts b/packages/jsts/src/rules/S3757/generated-meta.ts new file mode 100644 index 00000000000..5eae3addad2 --- /dev/null +++ b/packages/jsts/src/rules/S3757/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Arithmetic operations should not result in "NaN"', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3757/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3757'; diff --git a/packages/jsts/src/rules/S3757/meta.ts b/packages/jsts/src/rules/S3757/meta.ts index 5eae3addad2..cbdb9204af3 100644 --- a/packages/jsts/src/rules/S3757/meta.ts +++ b/packages/jsts/src/rules/S3757/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Arithmetic operations should not result in "NaN"', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3757/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3757'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'operation-returning-nan'; diff --git a/packages/jsts/src/rules/S3758/generated-meta.ts b/packages/jsts/src/rules/S3758/generated-meta.ts new file mode 100644 index 00000000000..9787b944589 --- /dev/null +++ b/packages/jsts/src/rules/S3758/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Values not convertible to numbers should not be used in numeric comparisons', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3758/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3758'; diff --git a/packages/jsts/src/rules/S3758/meta.ts b/packages/jsts/src/rules/S3758/meta.ts index 9787b944589..257d3a49821 100644 --- a/packages/jsts/src/rules/S3758/meta.ts +++ b/packages/jsts/src/rules/S3758/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Values not convertible to numbers should not be used in numeric comparisons', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3758/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3758'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'values-not-convertible-to-numbers'; diff --git a/packages/jsts/src/rules/S3760/generated-meta.ts b/packages/jsts/src/rules/S3760/generated-meta.ts new file mode 100644 index 00000000000..b9e7a820409 --- /dev/null +++ b/packages/jsts/src/rules/S3760/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Arithmetic operators should only have numbers as operands', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3760/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3760'; diff --git a/packages/jsts/src/rules/S3760/meta.ts b/packages/jsts/src/rules/S3760/meta.ts index b9e7a820409..8b01761103d 100644 --- a/packages/jsts/src/rules/S3760/meta.ts +++ b/packages/jsts/src/rules/S3760/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Arithmetic operators should only have numbers as operands', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3760/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3760'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'non-number-in-arithmetic-expression'; diff --git a/packages/jsts/src/rules/S3776/generated-meta.ts b/packages/jsts/src/rules/S3776/generated-meta.ts new file mode 100644 index 00000000000..0289e74d6d5 --- /dev/null +++ b/packages/jsts/src/rules/S3776/generated-meta.ts @@ -0,0 +1,45 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Cognitive Complexity of functions should not be too high', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3776/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3776'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 2, + items: [ + { + type: 'integer', + minimum: 0, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S3776/meta.ts b/packages/jsts/src/rules/S3776/meta.ts index 0289e74d6d5..71af9e9b19e 100644 --- a/packages/jsts/src/rules/S3776/meta.ts +++ b/packages/jsts/src/rules/S3776/meta.ts @@ -17,29 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Cognitive Complexity of functions should not be too high', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3776/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3776'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 2, - items: [ - { - type: 'integer', - minimum: 0, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'cognitive-complexity'; diff --git a/packages/jsts/src/rules/S3782/generated-meta.ts b/packages/jsts/src/rules/S3782/generated-meta.ts new file mode 100644 index 00000000000..5644b3c07e2 --- /dev/null +++ b/packages/jsts/src/rules/S3782/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Arguments to built-in functions should match documented types', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3782/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3782'; diff --git a/packages/jsts/src/rules/S3782/meta.ts b/packages/jsts/src/rules/S3782/meta.ts index 5644b3c07e2..43880b62843 100644 --- a/packages/jsts/src/rules/S3782/meta.ts +++ b/packages/jsts/src/rules/S3782/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Arguments to built-in functions should match documented types', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3782/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3782'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'argument-type'; diff --git a/packages/jsts/src/rules/S3785/generated-meta.ts b/packages/jsts/src/rules/S3785/generated-meta.ts new file mode 100644 index 00000000000..b96b9b5e122 --- /dev/null +++ b/packages/jsts/src/rules/S3785/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"in" should not be used with primitive types', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3785/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3785'; diff --git a/packages/jsts/src/rules/S3785/meta.ts b/packages/jsts/src/rules/S3785/meta.ts index b96b9b5e122..bff23b02bd8 100644 --- a/packages/jsts/src/rules/S3785/meta.ts +++ b/packages/jsts/src/rules/S3785/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: '"in" should not be used with primitive types', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3785/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3785'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'in-operator-type-error'; diff --git a/packages/jsts/src/rules/S3786/generated-meta.ts b/packages/jsts/src/rules/S3786/generated-meta.ts new file mode 100644 index 00000000000..87fa7441ac9 --- /dev/null +++ b/packages/jsts/src/rules/S3786/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Template literal placeholder syntax should not be used in regular strings', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3786/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3786'; diff --git a/packages/jsts/src/rules/S3786/index.ts b/packages/jsts/src/rules/S3786/index.ts new file mode 100644 index 00000000000..7c91377c67f --- /dev/null +++ b/packages/jsts/src/rules/S3786/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-template-curly-in-string'); diff --git a/packages/jsts/src/rules/S3786/meta.ts b/packages/jsts/src/rules/S3786/meta.ts new file mode 100644 index 00000000000..203f0de699a --- /dev/null +++ b/packages/jsts/src/rules/S3786/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-template-curly-in-string'; diff --git a/packages/jsts/src/rules/S3796/generated-meta.ts b/packages/jsts/src/rules/S3796/generated-meta.ts new file mode 100644 index 00000000000..9103034a709 --- /dev/null +++ b/packages/jsts/src/rules/S3796/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Callbacks of array methods should have return statements', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3796/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3796'; diff --git a/packages/jsts/src/rules/S3796/meta.ts b/packages/jsts/src/rules/S3796/meta.ts index 9103034a709..63ba9a4425e 100644 --- a/packages/jsts/src/rules/S3796/meta.ts +++ b/packages/jsts/src/rules/S3796/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Callbacks of array methods should have return statements', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3796/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3796'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'array-callback-without-return'; diff --git a/packages/jsts/src/rules/S3798/generated-meta.ts b/packages/jsts/src/rules/S3798/generated-meta.ts new file mode 100644 index 00000000000..f7997c6d62e --- /dev/null +++ b/packages/jsts/src/rules/S3798/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Variables and functions should not be declared in the global scope', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3798/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3798'; diff --git a/packages/jsts/src/rules/S3798/meta.ts b/packages/jsts/src/rules/S3798/meta.ts index f7997c6d62e..632963cb831 100644 --- a/packages/jsts/src/rules/S3798/meta.ts +++ b/packages/jsts/src/rules/S3798/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Variables and functions should not be declared in the global scope', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3798/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3798'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'declarations-in-global-scope'; diff --git a/packages/jsts/src/rules/S3799/generated-meta.ts b/packages/jsts/src/rules/S3799/generated-meta.ts new file mode 100644 index 00000000000..7243b74f61e --- /dev/null +++ b/packages/jsts/src/rules/S3799/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Destructuring patterns should not be empty', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3799/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3799'; diff --git a/packages/jsts/src/rules/S3799/index.ts b/packages/jsts/src/rules/S3799/index.ts new file mode 100644 index 00000000000..6a19f9b4597 --- /dev/null +++ b/packages/jsts/src/rules/S3799/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-empty-pattern'); diff --git a/packages/jsts/src/rules/S3799/meta.ts b/packages/jsts/src/rules/S3799/meta.ts new file mode 100644 index 00000000000..175873fb44c --- /dev/null +++ b/packages/jsts/src/rules/S3799/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-empty-pattern'; diff --git a/packages/jsts/src/rules/S3800/generated-meta.ts b/packages/jsts/src/rules/S3800/generated-meta.ts new file mode 100644 index 00000000000..c624e604cef --- /dev/null +++ b/packages/jsts/src/rules/S3800/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Functions should always return the same type', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3800/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S3800'; diff --git a/packages/jsts/src/rules/S3800/meta.ts b/packages/jsts/src/rules/S3800/meta.ts index c624e604cef..cc99aea32d2 100644 --- a/packages/jsts/src/rules/S3800/meta.ts +++ b/packages/jsts/src/rules/S3800/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Functions should always return the same type', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3800/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S3800'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'function-return-type'; diff --git a/packages/jsts/src/rules/S3801/generated-meta.ts b/packages/jsts/src/rules/S3801/generated-meta.ts new file mode 100644 index 00000000000..6a508352d41 --- /dev/null +++ b/packages/jsts/src/rules/S3801/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Functions should use "return" consistently', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3801/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3801'; diff --git a/packages/jsts/src/rules/S3801/meta.ts b/packages/jsts/src/rules/S3801/meta.ts index 6a508352d41..eb8ab24f600 100644 --- a/packages/jsts/src/rules/S3801/meta.ts +++ b/packages/jsts/src/rules/S3801/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Functions should use "return" consistently', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3801/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3801'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-inconsistent-returns'; diff --git a/packages/jsts/src/rules/S3812/generated-meta.ts b/packages/jsts/src/rules/S3812/generated-meta.ts new file mode 100644 index 00000000000..87328845f2f --- /dev/null +++ b/packages/jsts/src/rules/S3812/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Parentheses should be used when negating "in" and "instanceof" operations', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3812/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3812'; diff --git a/packages/jsts/src/rules/S3812/index.ts b/packages/jsts/src/rules/S3812/index.ts new file mode 100644 index 00000000000..bf80dca0fb4 --- /dev/null +++ b/packages/jsts/src/rules/S3812/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-unsafe-negation'); diff --git a/packages/jsts/src/rules/S3812/meta.ts b/packages/jsts/src/rules/S3812/meta.ts new file mode 100644 index 00000000000..c9cba41630f --- /dev/null +++ b/packages/jsts/src/rules/S3812/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-unsafe-negation'; diff --git a/packages/jsts/src/rules/S3827/generated-meta.ts b/packages/jsts/src/rules/S3827/generated-meta.ts new file mode 100644 index 00000000000..5f1fafdbf9b --- /dev/null +++ b/packages/jsts/src/rules/S3827/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Variables should be defined before being used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3827/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3827'; diff --git a/packages/jsts/src/rules/S3827/meta.ts b/packages/jsts/src/rules/S3827/meta.ts index 5f1fafdbf9b..45e7d7fb2b0 100644 --- a/packages/jsts/src/rules/S3827/meta.ts +++ b/packages/jsts/src/rules/S3827/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Variables should be defined before being used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3827/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3827'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-reference-error'; diff --git a/packages/jsts/src/rules/S3834/generated-meta.ts b/packages/jsts/src/rules/S3834/generated-meta.ts new file mode 100644 index 00000000000..0ec1949ceeb --- /dev/null +++ b/packages/jsts/src/rules/S3834/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"new" operator should not be used with Symbol and BigInt', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3834/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3834'; diff --git a/packages/jsts/src/rules/S3834/index.ts b/packages/jsts/src/rules/S3834/index.ts new file mode 100644 index 00000000000..ebced78bf4c --- /dev/null +++ b/packages/jsts/src/rules/S3834/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-new-native-nonconstructor'); diff --git a/packages/jsts/src/rules/S3834/meta.ts b/packages/jsts/src/rules/S3834/meta.ts new file mode 100644 index 00000000000..ad4c42911d4 --- /dev/null +++ b/packages/jsts/src/rules/S3834/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-new-native-nonconstructor'; diff --git a/packages/jsts/src/rules/S3854/generated-meta.ts b/packages/jsts/src/rules/S3854/generated-meta.ts new file mode 100644 index 00000000000..b97fe2534f2 --- /dev/null +++ b/packages/jsts/src/rules/S3854/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"super()" should be invoked appropriately', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3854/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3854'; diff --git a/packages/jsts/src/rules/S3854/meta.ts b/packages/jsts/src/rules/S3854/meta.ts index b97fe2534f2..71064a2aded 100644 --- a/packages/jsts/src/rules/S3854/meta.ts +++ b/packages/jsts/src/rules/S3854/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: '"super()" should be invoked appropriately', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3854/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3854'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'super-invocation'; diff --git a/packages/jsts/src/rules/S3854/rule.ts b/packages/jsts/src/rules/S3854/rule.ts index 22665e1e907..88e4b3e599e 100644 --- a/packages/jsts/src/rules/S3854/rule.ts +++ b/packages/jsts/src/rules/S3854/rule.ts @@ -20,12 +20,12 @@ // https://sonarsource.github.io/rspec/#/rspec/S3854/javascript import type { Rule } from 'eslint'; -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { generateMeta, mergeRules } from '../helpers/index.js'; import { meta } from './meta.js'; -const constructorSuperRule = eslintRules['constructor-super']; -const noThisBeforeSuperRule = eslintRules['no-this-before-super']; +const constructorSuperRule = getESLintCoreRule('constructor-super'); +const noThisBeforeSuperRule = getESLintCoreRule('no-this-before-super'); export const rule: Rule.RuleModule = { meta: generateMeta(meta as Rule.RuleMetaData, { diff --git a/packages/jsts/src/rules/S3863/generated-meta.ts b/packages/jsts/src/rules/S3863/generated-meta.ts new file mode 100644 index 00000000000..0a3d968ae94 --- /dev/null +++ b/packages/jsts/src/rules/S3863/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Imports from the same module should be merged', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3863/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3863'; diff --git a/packages/jsts/src/rules/S3863/index.ts b/packages/jsts/src/rules/S3863/index.ts new file mode 100644 index 00000000000..bb09854753a --- /dev/null +++ b/packages/jsts/src/rules/S3863/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from 'eslint-plugin-import'; +export const rule = rules['no-duplicates']; diff --git a/packages/jsts/src/rules/S3863/meta.ts b/packages/jsts/src/rules/S3863/meta.ts new file mode 100644 index 00000000000..2a597c6b452 --- /dev/null +++ b/packages/jsts/src/rules/S3863/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-duplicates'; diff --git a/packages/jsts/src/rules/S3923/generated-meta.ts b/packages/jsts/src/rules/S3923/generated-meta.ts new file mode 100644 index 00000000000..435ae1a8642 --- /dev/null +++ b/packages/jsts/src/rules/S3923/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: + 'All branches in a conditional structure should not have exactly the same implementation', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3923/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S3923'; diff --git a/packages/jsts/src/rules/S3923/meta.ts b/packages/jsts/src/rules/S3923/meta.ts index 435ae1a8642..3ae1112c408 100644 --- a/packages/jsts/src/rules/S3923/meta.ts +++ b/packages/jsts/src/rules/S3923/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: - 'All branches in a conditional structure should not have exactly the same implementation', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3923/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S3923'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-all-duplicated-branches'; diff --git a/packages/jsts/src/rules/S3972/generated-meta.ts b/packages/jsts/src/rules/S3972/generated-meta.ts new file mode 100644 index 00000000000..fda0976c756 --- /dev/null +++ b/packages/jsts/src/rules/S3972/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Conditionals should start on new lines', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3972/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3972'; diff --git a/packages/jsts/src/rules/S3972/meta.ts b/packages/jsts/src/rules/S3972/meta.ts index fda0976c756..e34f5fb2ecc 100644 --- a/packages/jsts/src/rules/S3972/meta.ts +++ b/packages/jsts/src/rules/S3972/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Conditionals should start on new lines', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3972/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S3972'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-same-line-conditional'; diff --git a/packages/jsts/src/rules/S3973/generated-meta.ts b/packages/jsts/src/rules/S3973/generated-meta.ts new file mode 100644 index 00000000000..933ec7bd48c --- /dev/null +++ b/packages/jsts/src/rules/S3973/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'A conditionally executed single line should be denoted by indentation', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3973/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S3973'; diff --git a/packages/jsts/src/rules/S3973/meta.ts b/packages/jsts/src/rules/S3973/meta.ts index 933ec7bd48c..df29f3f0268 100644 --- a/packages/jsts/src/rules/S3973/meta.ts +++ b/packages/jsts/src/rules/S3973/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'A conditionally executed single line should be denoted by indentation', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3973/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S3973'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'conditional-indentation'; diff --git a/packages/jsts/src/rules/S3981/generated-meta.ts b/packages/jsts/src/rules/S3981/generated-meta.ts new file mode 100644 index 00000000000..4ba03c812f7 --- /dev/null +++ b/packages/jsts/src/rules/S3981/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Collection size and array length comparisons should make sense', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3981/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3981'; diff --git a/packages/jsts/src/rules/S3981/meta.ts b/packages/jsts/src/rules/S3981/meta.ts index 4ba03c812f7..d3521275aee 100644 --- a/packages/jsts/src/rules/S3981/meta.ts +++ b/packages/jsts/src/rules/S3981/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Collection size and array length comparisons should make sense', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3981/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S3981'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-collection-size-mischeck'; diff --git a/packages/jsts/src/rules/S3984/generated-meta.ts b/packages/jsts/src/rules/S3984/generated-meta.ts new file mode 100644 index 00000000000..a88643e6429 --- /dev/null +++ b/packages/jsts/src/rules/S3984/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Errors should not be created without being thrown', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S3984/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S3984'; diff --git a/packages/jsts/src/rules/S3984/meta.ts b/packages/jsts/src/rules/S3984/meta.ts index a88643e6429..e33392f77a1 100644 --- a/packages/jsts/src/rules/S3984/meta.ts +++ b/packages/jsts/src/rules/S3984/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Errors should not be created without being thrown', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S3984/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S3984'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-unthrown-error'; diff --git a/packages/jsts/src/rules/S4023/generated-meta.ts b/packages/jsts/src/rules/S4023/generated-meta.ts new file mode 100644 index 00000000000..ae7b84c9692 --- /dev/null +++ b/packages/jsts/src/rules/S4023/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Interfaces should not be empty', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4023/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4023'; diff --git a/packages/jsts/src/rules/S4023/index.ts b/packages/jsts/src/rules/S4023/index.ts index 387e874fd5f..f699b84e3e0 100644 --- a/packages/jsts/src/rules/S4023/index.ts +++ b/packages/jsts/src/rules/S4023/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { decorate } from './decorator.js'; export const rule = decorate(tsEslintRules['no-empty-interface']); diff --git a/packages/jsts/src/rules/S4023/meta.ts b/packages/jsts/src/rules/S4023/meta.ts index ae7b84c9692..d24d19bf81d 100644 --- a/packages/jsts/src/rules/S4023/meta.ts +++ b/packages/jsts/src/rules/S4023/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Interfaces should not be empty', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4023/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S4023'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-empty-interface'; diff --git a/packages/jsts/src/rules/S4030/generated-meta.ts b/packages/jsts/src/rules/S4030/generated-meta.ts new file mode 100644 index 00000000000..7b04eadbfb0 --- /dev/null +++ b/packages/jsts/src/rules/S4030/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Collection contents should be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4030/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4030'; diff --git a/packages/jsts/src/rules/S4030/meta.ts b/packages/jsts/src/rules/S4030/meta.ts index 7b04eadbfb0..aadfa503dc1 100644 --- a/packages/jsts/src/rules/S4030/meta.ts +++ b/packages/jsts/src/rules/S4030/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Collection contents should be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4030/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4030'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-unused-collection'; diff --git a/packages/jsts/src/rules/S4036/generated-meta.ts b/packages/jsts/src/rules/S4036/generated-meta.ts new file mode 100644 index 00000000000..c546ec49a55 --- /dev/null +++ b/packages/jsts/src/rules/S4036/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Searching OS commands in PATH is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4036/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4036'; diff --git a/packages/jsts/src/rules/S4036/meta.ts b/packages/jsts/src/rules/S4036/meta.ts index c546ec49a55..ebc8203d700 100644 --- a/packages/jsts/src/rules/S4036/meta.ts +++ b/packages/jsts/src/rules/S4036/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Searching OS commands in PATH is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4036/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4036'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-os-command-from-path'; diff --git a/packages/jsts/src/rules/S4043/generated-meta.ts b/packages/jsts/src/rules/S4043/generated-meta.ts new file mode 100644 index 00000000000..3d07a9e9e51 --- /dev/null +++ b/packages/jsts/src/rules/S4043/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Array-mutating methods should not be used misleadingly', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4043/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4043'; diff --git a/packages/jsts/src/rules/S4043/meta.ts b/packages/jsts/src/rules/S4043/meta.ts index 3d07a9e9e51..0afddf8733f 100644 --- a/packages/jsts/src/rules/S4043/meta.ts +++ b/packages/jsts/src/rules/S4043/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Array-mutating methods should not be used misleadingly', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4043/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S4043'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-misleading-array-reverse'; diff --git a/packages/jsts/src/rules/S4084/generated-meta.ts b/packages/jsts/src/rules/S4084/generated-meta.ts new file mode 100644 index 00000000000..72c4a94143b --- /dev/null +++ b/packages/jsts/src/rules/S4084/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Media elements should have captions', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4084/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4084'; diff --git a/packages/jsts/src/rules/S4084/meta.ts b/packages/jsts/src/rules/S4084/meta.ts index 72c4a94143b..f449c5c79fa 100644 --- a/packages/jsts/src/rules/S4084/meta.ts +++ b/packages/jsts/src/rules/S4084/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Media elements should have captions', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4084/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4084'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'media-has-caption'; diff --git a/packages/jsts/src/rules/S4123/generated-meta.ts b/packages/jsts/src/rules/S4123/generated-meta.ts new file mode 100644 index 00000000000..8ae89b5b670 --- /dev/null +++ b/packages/jsts/src/rules/S4123/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"await" should only be used with promises', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4123/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S4123'; diff --git a/packages/jsts/src/rules/S4123/meta.ts b/packages/jsts/src/rules/S4123/meta.ts index 8ae89b5b670..17b774bbe6f 100644 --- a/packages/jsts/src/rules/S4123/meta.ts +++ b/packages/jsts/src/rules/S4123/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"await" should only be used with promises', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4123/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S4123'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-invalid-await'; diff --git a/packages/jsts/src/rules/S4124/generated-meta.ts b/packages/jsts/src/rules/S4124/generated-meta.ts new file mode 100644 index 00000000000..a85ef9e6f14 --- /dev/null +++ b/packages/jsts/src/rules/S4124/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Constructors should not be declared inside interfaces', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4124/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4124'; diff --git a/packages/jsts/src/rules/S4124/index.ts b/packages/jsts/src/rules/S4124/index.ts new file mode 100644 index 00000000000..ca3321f708f --- /dev/null +++ b/packages/jsts/src/rules/S4124/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['no-misused-new']; diff --git a/packages/jsts/src/rules/S4124/meta.ts b/packages/jsts/src/rules/S4124/meta.ts new file mode 100644 index 00000000000..78329e00e5d --- /dev/null +++ b/packages/jsts/src/rules/S4124/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-misused-new'; diff --git a/packages/jsts/src/rules/S4125/generated-meta.ts b/packages/jsts/src/rules/S4125/generated-meta.ts new file mode 100644 index 00000000000..1d9193a0328 --- /dev/null +++ b/packages/jsts/src/rules/S4125/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: '"typeof" expressions should only be compared to valid values', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4125/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4125'; diff --git a/packages/jsts/src/rules/S4125/index.ts b/packages/jsts/src/rules/S4125/index.ts new file mode 100644 index 00000000000..88e86ff363a --- /dev/null +++ b/packages/jsts/src/rules/S4125/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('valid-typeof'); diff --git a/packages/jsts/src/rules/S4125/meta.ts b/packages/jsts/src/rules/S4125/meta.ts new file mode 100644 index 00000000000..8cc6101fbf8 --- /dev/null +++ b/packages/jsts/src/rules/S4125/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'valid-typeof'; diff --git a/packages/jsts/src/rules/S4136/generated-meta.ts b/packages/jsts/src/rules/S4136/generated-meta.ts new file mode 100644 index 00000000000..465db6bc5d0 --- /dev/null +++ b/packages/jsts/src/rules/S4136/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Method overloads should be grouped together', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4136/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4136'; diff --git a/packages/jsts/src/rules/S4136/index.ts b/packages/jsts/src/rules/S4136/index.ts new file mode 100644 index 00000000000..b7930a3da16 --- /dev/null +++ b/packages/jsts/src/rules/S4136/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['adjacent-overload-signatures']; diff --git a/packages/jsts/src/rules/S4136/meta.ts b/packages/jsts/src/rules/S4136/meta.ts new file mode 100644 index 00000000000..646bd47db27 --- /dev/null +++ b/packages/jsts/src/rules/S4136/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'adjacent-overload-signatures'; diff --git a/packages/jsts/src/rules/S4137/generated-meta.ts b/packages/jsts/src/rules/S4137/generated-meta.ts new file mode 100644 index 00000000000..313886db211 --- /dev/null +++ b/packages/jsts/src/rules/S4137/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Type assertions should use "as"', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4137/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4137'; diff --git a/packages/jsts/src/rules/S4137/index.ts b/packages/jsts/src/rules/S4137/index.ts new file mode 100644 index 00000000000..e0f2e3880d9 --- /dev/null +++ b/packages/jsts/src/rules/S4137/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['consistent-type-assertions']; diff --git a/packages/jsts/src/rules/S4137/meta.ts b/packages/jsts/src/rules/S4137/meta.ts new file mode 100644 index 00000000000..664a245c239 --- /dev/null +++ b/packages/jsts/src/rules/S4137/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'consistent-type-assertions'; diff --git a/packages/jsts/src/rules/S4138/generated-meta.ts b/packages/jsts/src/rules/S4138/generated-meta.ts new file mode 100644 index 00000000000..30ebc4b87f9 --- /dev/null +++ b/packages/jsts/src/rules/S4138/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"for of" should be used with Iterables', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4138/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4138'; diff --git a/packages/jsts/src/rules/S4138/index.ts b/packages/jsts/src/rules/S4138/index.ts index e80ef85386d..80a2f54029e 100644 --- a/packages/jsts/src/rules/S4138/index.ts +++ b/packages/jsts/src/rules/S4138/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { decorate } from './decorator.js'; export const rule = decorate(tsEslintRules['prefer-for-of']); diff --git a/packages/jsts/src/rules/S4138/meta.ts b/packages/jsts/src/rules/S4138/meta.ts index 30ebc4b87f9..5d2b28e0742 100644 --- a/packages/jsts/src/rules/S4138/meta.ts +++ b/packages/jsts/src/rules/S4138/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"for of" should be used with Iterables', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4138/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S4138'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'prefer-for-of'; diff --git a/packages/jsts/src/rules/S4139/generated-meta.ts b/packages/jsts/src/rules/S4139/generated-meta.ts new file mode 100644 index 00000000000..22d46b4d242 --- /dev/null +++ b/packages/jsts/src/rules/S4139/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"for in" should not be used with iterables', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4139/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S4139'; diff --git a/packages/jsts/src/rules/S4139/meta.ts b/packages/jsts/src/rules/S4139/meta.ts index 22d46b4d242..02a28474e2f 100644 --- a/packages/jsts/src/rules/S4139/meta.ts +++ b/packages/jsts/src/rules/S4139/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"for in" should not be used with iterables', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4139/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S4139'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-for-in-iterable'; diff --git a/packages/jsts/src/rules/S4140/generated-meta.ts b/packages/jsts/src/rules/S4140/generated-meta.ts new file mode 100644 index 00000000000..d78bd2e78fe --- /dev/null +++ b/packages/jsts/src/rules/S4140/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Sparse arrays should not be created with extra commas', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4140/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4140'; diff --git a/packages/jsts/src/rules/S4140/index.ts b/packages/jsts/src/rules/S4140/index.ts new file mode 100644 index 00000000000..b8907ea3f0c --- /dev/null +++ b/packages/jsts/src/rules/S4140/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-sparse-arrays'); diff --git a/packages/jsts/src/rules/S4140/meta.ts b/packages/jsts/src/rules/S4140/meta.ts new file mode 100644 index 00000000000..0378e086a97 --- /dev/null +++ b/packages/jsts/src/rules/S4140/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-sparse-arrays'; diff --git a/packages/jsts/src/rules/S4143/generated-meta.ts b/packages/jsts/src/rules/S4143/generated-meta.ts new file mode 100644 index 00000000000..ddd70d71937 --- /dev/null +++ b/packages/jsts/src/rules/S4143/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Collection elements should not be replaced unconditionally', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4143/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4143'; diff --git a/packages/jsts/src/rules/S4143/meta.ts b/packages/jsts/src/rules/S4143/meta.ts index ddd70d71937..02ab90d2587 100644 --- a/packages/jsts/src/rules/S4143/meta.ts +++ b/packages/jsts/src/rules/S4143/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Collection elements should not be replaced unconditionally', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4143/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4143'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-element-overwrite'; diff --git a/packages/jsts/src/rules/S4144/generated-meta.ts b/packages/jsts/src/rules/S4144/generated-meta.ts new file mode 100644 index 00000000000..3ea5f7f4fdd --- /dev/null +++ b/packages/jsts/src/rules/S4144/generated-meta.ts @@ -0,0 +1,45 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Functions should not have identical implementations', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4144/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4144'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 2, + items: [ + { + type: 'integer', + minimum: 3, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S4144/meta.ts b/packages/jsts/src/rules/S4144/meta.ts index 3ea5f7f4fdd..972255fd1e5 100644 --- a/packages/jsts/src/rules/S4144/meta.ts +++ b/packages/jsts/src/rules/S4144/meta.ts @@ -17,29 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Functions should not have identical implementations', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4144/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4144'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 2, - items: [ - { - type: 'integer', - minimum: 3, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-identical-functions'; diff --git a/packages/jsts/src/rules/S4156/generated-meta.ts b/packages/jsts/src/rules/S4156/generated-meta.ts new file mode 100644 index 00000000000..c9de3ed1843 --- /dev/null +++ b/packages/jsts/src/rules/S4156/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"module" should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4156/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4156'; diff --git a/packages/jsts/src/rules/S4156/index.ts b/packages/jsts/src/rules/S4156/index.ts index cb740c59935..e7734e4c887 100644 --- a/packages/jsts/src/rules/S4156/index.ts +++ b/packages/jsts/src/rules/S4156/index.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S4156/javascript -import { tsEslintRules as rules } from '../typescript-eslint/index.js'; +import { rules } from '../typescript-eslint/index.js'; import { decorate } from './decorator.js'; export const rule = decorate(rules['prefer-namespace-keyword']); diff --git a/packages/jsts/src/rules/S4156/meta.ts b/packages/jsts/src/rules/S4156/meta.ts index c9de3ed1843..1f830e1bd6f 100644 --- a/packages/jsts/src/rules/S4156/meta.ts +++ b/packages/jsts/src/rules/S4156/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"module" should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4156/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S4156'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'prefer-namespace-keyword'; diff --git a/packages/jsts/src/rules/S4157/generated-meta.ts b/packages/jsts/src/rules/S4157/generated-meta.ts new file mode 100644 index 00000000000..d6da04627b0 --- /dev/null +++ b/packages/jsts/src/rules/S4157/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Default type parameters should be omitted', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4157/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4157'; diff --git a/packages/jsts/src/rules/S4157/index.ts b/packages/jsts/src/rules/S4157/index.ts new file mode 100644 index 00000000000..a9451fdf2da --- /dev/null +++ b/packages/jsts/src/rules/S4157/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['no-unnecessary-type-arguments']; diff --git a/packages/jsts/src/rules/S4157/meta.ts b/packages/jsts/src/rules/S4157/meta.ts new file mode 100644 index 00000000000..49a2c7e3fe2 --- /dev/null +++ b/packages/jsts/src/rules/S4157/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-unnecessary-type-arguments'; diff --git a/packages/jsts/src/rules/S4158/generated-meta.ts b/packages/jsts/src/rules/S4158/generated-meta.ts new file mode 100644 index 00000000000..ac3e1e6c96f --- /dev/null +++ b/packages/jsts/src/rules/S4158/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Empty collections should not be accessed or iterated', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4158/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4158'; diff --git a/packages/jsts/src/rules/S4158/meta.ts b/packages/jsts/src/rules/S4158/meta.ts index ac3e1e6c96f..8b518bd14b8 100644 --- a/packages/jsts/src/rules/S4158/meta.ts +++ b/packages/jsts/src/rules/S4158/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Empty collections should not be accessed or iterated', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4158/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4158'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-empty-collection'; diff --git a/packages/jsts/src/rules/S4165/generated-meta.ts b/packages/jsts/src/rules/S4165/generated-meta.ts new file mode 100644 index 00000000000..12c3a50db3a --- /dev/null +++ b/packages/jsts/src/rules/S4165/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Assignments should not be redundant', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4165/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4165'; diff --git a/packages/jsts/src/rules/S4165/meta.ts b/packages/jsts/src/rules/S4165/meta.ts index 12c3a50db3a..fe829a2e5b8 100644 --- a/packages/jsts/src/rules/S4165/meta.ts +++ b/packages/jsts/src/rules/S4165/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Assignments should not be redundant', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4165/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4165'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-redundant-assignments'; diff --git a/packages/jsts/src/rules/S4204/generated-meta.ts b/packages/jsts/src/rules/S4204/generated-meta.ts new file mode 100644 index 00000000000..0d8738a2f6f --- /dev/null +++ b/packages/jsts/src/rules/S4204/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'The "any" type should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4204/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4204'; diff --git a/packages/jsts/src/rules/S4204/index.ts b/packages/jsts/src/rules/S4204/index.ts new file mode 100644 index 00000000000..b4a0b3b8b79 --- /dev/null +++ b/packages/jsts/src/rules/S4204/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['no-explicit-any']; diff --git a/packages/jsts/src/rules/S4204/meta.ts b/packages/jsts/src/rules/S4204/meta.ts new file mode 100644 index 00000000000..edb0826b0ef --- /dev/null +++ b/packages/jsts/src/rules/S4204/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-explicit-any'; diff --git a/packages/jsts/src/rules/S4275/generated-meta.ts b/packages/jsts/src/rules/S4275/generated-meta.ts new file mode 100644 index 00000000000..3144cdcdbb6 --- /dev/null +++ b/packages/jsts/src/rules/S4275/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Getters and setters should access the expected fields', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4275/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4275'; diff --git a/packages/jsts/src/rules/S4275/meta.ts b/packages/jsts/src/rules/S4275/meta.ts index 3144cdcdbb6..8bb8640254f 100644 --- a/packages/jsts/src/rules/S4275/meta.ts +++ b/packages/jsts/src/rules/S4275/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Getters and setters should access the expected fields', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4275/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4275'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-accessor-field-mismatch'; diff --git a/packages/jsts/src/rules/S4275/rule.ts b/packages/jsts/src/rules/S4275/rule.ts index 838fb9dd52c..aa41bcc2303 100644 --- a/packages/jsts/src/rules/S4275/rule.ts +++ b/packages/jsts/src/rules/S4275/rule.ts @@ -32,10 +32,10 @@ import { report, toSecondaryLocation, } from '../helpers/index.js'; -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { meta } from './meta.js'; -const getterReturnRule = eslintRules['getter-return']; +const getterReturnRule = getESLintCoreRule('getter-return'); type AccessorNode = TSESTree.Property | TSESTree.MethodDefinition; function isAccessorNode(node: TSESTree.Node | null | undefined): node is AccessorNode { diff --git a/packages/jsts/src/rules/S4322/generated-meta.ts b/packages/jsts/src/rules/S4322/generated-meta.ts new file mode 100644 index 00000000000..793e1807289 --- /dev/null +++ b/packages/jsts/src/rules/S4322/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Type predicates should be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4322/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4322'; diff --git a/packages/jsts/src/rules/S4322/meta.ts b/packages/jsts/src/rules/S4322/meta.ts index 793e1807289..0ea99cbae5d 100644 --- a/packages/jsts/src/rules/S4322/meta.ts +++ b/packages/jsts/src/rules/S4322/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Type predicates should be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4322/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S4322'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'prefer-type-guard'; diff --git a/packages/jsts/src/rules/S4323/generated-meta.ts b/packages/jsts/src/rules/S4323/generated-meta.ts new file mode 100644 index 00000000000..fad7bc2e85b --- /dev/null +++ b/packages/jsts/src/rules/S4323/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Type aliases should be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4323/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4323'; diff --git a/packages/jsts/src/rules/S4323/meta.ts b/packages/jsts/src/rules/S4323/meta.ts index fad7bc2e85b..f8e2169e7a0 100644 --- a/packages/jsts/src/rules/S4323/meta.ts +++ b/packages/jsts/src/rules/S4323/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Type aliases should be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4323/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4323'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'use-type-alias'; diff --git a/packages/jsts/src/rules/S4324/generated-meta.ts b/packages/jsts/src/rules/S4324/generated-meta.ts new file mode 100644 index 00000000000..662e12148ee --- /dev/null +++ b/packages/jsts/src/rules/S4324/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Primitive return types should be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4324/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S4324'; diff --git a/packages/jsts/src/rules/S4324/meta.ts b/packages/jsts/src/rules/S4324/meta.ts index 662e12148ee..1c573edf4d9 100644 --- a/packages/jsts/src/rules/S4324/meta.ts +++ b/packages/jsts/src/rules/S4324/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Primitive return types should be used', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4324/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S4324'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-return-type-any'; diff --git a/packages/jsts/src/rules/S4325/generated-meta.ts b/packages/jsts/src/rules/S4325/generated-meta.ts new file mode 100644 index 00000000000..bc3710f94d1 --- /dev/null +++ b/packages/jsts/src/rules/S4325/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Redundant casts and non-null assertions should be avoided', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4325/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4325'; diff --git a/packages/jsts/src/rules/S4325/index.ts b/packages/jsts/src/rules/S4325/index.ts new file mode 100644 index 00000000000..a7394139b72 --- /dev/null +++ b/packages/jsts/src/rules/S4325/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { rules } from '../typescript-eslint/index.js'; +export const rule = rules['no-unnecessary-type-assertion']; diff --git a/packages/jsts/src/rules/S4325/meta.ts b/packages/jsts/src/rules/S4325/meta.ts new file mode 100644 index 00000000000..71dd18de65e --- /dev/null +++ b/packages/jsts/src/rules/S4325/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-unnecessary-type-assertion'; diff --git a/packages/jsts/src/rules/S4326/generated-meta.ts b/packages/jsts/src/rules/S4326/generated-meta.ts new file mode 100644 index 00000000000..2c03e08eb90 --- /dev/null +++ b/packages/jsts/src/rules/S4326/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"await" should not be used redundantly', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4326/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4326'; diff --git a/packages/jsts/src/rules/S4326/index.ts b/packages/jsts/src/rules/S4326/index.ts new file mode 100644 index 00000000000..fc8e2c8efb7 --- /dev/null +++ b/packages/jsts/src/rules/S4326/index.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import { getESLintCoreRule } from '../core/index.js'; +export const rule = getESLintCoreRule('no-return-await'); diff --git a/packages/jsts/src/rules/S4326/meta.ts b/packages/jsts/src/rules/S4326/meta.ts new file mode 100644 index 00000000000..1f32e742f6a --- /dev/null +++ b/packages/jsts/src/rules/S4326/meta.ts @@ -0,0 +1,22 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +export * from './generated-meta.js'; +export const implementation = 'external'; +export const eslintId = 'no-return-await'; diff --git a/packages/jsts/src/rules/S4327/generated-meta.ts b/packages/jsts/src/rules/S4327/generated-meta.ts new file mode 100644 index 00000000000..cdca583f08a --- /dev/null +++ b/packages/jsts/src/rules/S4327/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"this" should not be assigned to variables', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4327/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4327'; diff --git a/packages/jsts/src/rules/S4327/index.ts b/packages/jsts/src/rules/S4327/index.ts index c6c9d20d09f..b47ca941d1f 100644 --- a/packages/jsts/src/rules/S4327/index.ts +++ b/packages/jsts/src/rules/S4327/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { decorate } from './decorator.js'; export const rule = decorate(tsEslintRules['no-this-alias']); diff --git a/packages/jsts/src/rules/S4327/meta.ts b/packages/jsts/src/rules/S4327/meta.ts index cdca583f08a..1021004d6e8 100644 --- a/packages/jsts/src/rules/S4327/meta.ts +++ b/packages/jsts/src/rules/S4327/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"this" should not be assigned to variables', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4327/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4327'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-this-alias'; diff --git a/packages/jsts/src/rules/S4328/generated-meta.ts b/packages/jsts/src/rules/S4328/generated-meta.ts new file mode 100644 index 00000000000..f7ad69f9d89 --- /dev/null +++ b/packages/jsts/src/rules/S4328/generated-meta.ts @@ -0,0 +1,53 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Dependencies should be explicit', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4328/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4328'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + whitelist: { + type: 'array', + items: { + type: 'string', + }, + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S4328/meta.ts b/packages/jsts/src/rules/S4328/meta.ts index f7ad69f9d89..adfbcc411ed 100644 --- a/packages/jsts/src/rules/S4328/meta.ts +++ b/packages/jsts/src/rules/S4328/meta.ts @@ -17,37 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Dependencies should be explicit', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4328/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4328'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - whitelist: { - type: 'array', - items: { - type: 'string', - }, - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-implicit-dependencies'; diff --git a/packages/jsts/src/rules/S4335/generated-meta.ts b/packages/jsts/src/rules/S4335/generated-meta.ts new file mode 100644 index 00000000000..471f0dce2aa --- /dev/null +++ b/packages/jsts/src/rules/S4335/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Type intersections should use meaningful types', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4335/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S4335'; diff --git a/packages/jsts/src/rules/S4335/meta.ts b/packages/jsts/src/rules/S4335/meta.ts index 471f0dce2aa..e9a2747c8d8 100644 --- a/packages/jsts/src/rules/S4335/meta.ts +++ b/packages/jsts/src/rules/S4335/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Type intersections should use meaningful types', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4335/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S4335'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-useless-intersection'; diff --git a/packages/jsts/src/rules/S4423/generated-meta.ts b/packages/jsts/src/rules/S4423/generated-meta.ts new file mode 100644 index 00000000000..8b7e6687b5c --- /dev/null +++ b/packages/jsts/src/rules/S4423/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Weak SSL/TLS protocols should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4423/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4423'; diff --git a/packages/jsts/src/rules/S4423/meta.ts b/packages/jsts/src/rules/S4423/meta.ts index 8b7e6687b5c..a6295f51189 100644 --- a/packages/jsts/src/rules/S4423/meta.ts +++ b/packages/jsts/src/rules/S4423/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Weak SSL/TLS protocols should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4423/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4423'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'weak-ssl'; diff --git a/packages/jsts/src/rules/S4426/generated-meta.ts b/packages/jsts/src/rules/S4426/generated-meta.ts new file mode 100644 index 00000000000..6cbe1072251 --- /dev/null +++ b/packages/jsts/src/rules/S4426/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Cryptographic keys should be robust', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4426/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4426'; diff --git a/packages/jsts/src/rules/S4426/meta.ts b/packages/jsts/src/rules/S4426/meta.ts index 6cbe1072251..65e0463d943 100644 --- a/packages/jsts/src/rules/S4426/meta.ts +++ b/packages/jsts/src/rules/S4426/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Cryptographic keys should be robust', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4426/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4426'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-weak-keys'; diff --git a/packages/jsts/src/rules/S4502/generated-meta.ts b/packages/jsts/src/rules/S4502/generated-meta.ts new file mode 100644 index 00000000000..c586afdb14c --- /dev/null +++ b/packages/jsts/src/rules/S4502/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Disabling CSRF protections is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4502/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4502'; diff --git a/packages/jsts/src/rules/S4502/meta.ts b/packages/jsts/src/rules/S4502/meta.ts index c586afdb14c..fddac50a531 100644 --- a/packages/jsts/src/rules/S4502/meta.ts +++ b/packages/jsts/src/rules/S4502/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Disabling CSRF protections is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4502/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4502'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'csrf'; diff --git a/packages/jsts/src/rules/S4507/generated-meta.ts b/packages/jsts/src/rules/S4507/generated-meta.ts new file mode 100644 index 00000000000..ae8b8bef4f4 --- /dev/null +++ b/packages/jsts/src/rules/S4507/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: + 'Delivering code in production with debug features activated is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4507/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4507'; diff --git a/packages/jsts/src/rules/S4507/meta.ts b/packages/jsts/src/rules/S4507/meta.ts index ae8b8bef4f4..6ea3844f6ec 100644 --- a/packages/jsts/src/rules/S4507/meta.ts +++ b/packages/jsts/src/rules/S4507/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: - 'Delivering code in production with debug features activated is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4507/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4507'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'production-debug'; diff --git a/packages/jsts/src/rules/S4524/generated-meta.ts b/packages/jsts/src/rules/S4524/generated-meta.ts new file mode 100644 index 00000000000..95a33ff863c --- /dev/null +++ b/packages/jsts/src/rules/S4524/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"default" clauses should be last', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4524/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4524'; diff --git a/packages/jsts/src/rules/S4524/meta.ts b/packages/jsts/src/rules/S4524/meta.ts index 95a33ff863c..1b03209ecad 100644 --- a/packages/jsts/src/rules/S4524/meta.ts +++ b/packages/jsts/src/rules/S4524/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"default" clauses should be last', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4524/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4524'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'prefer-default-last'; diff --git a/packages/jsts/src/rules/S4619/generated-meta.ts b/packages/jsts/src/rules/S4619/generated-meta.ts new file mode 100644 index 00000000000..3fe2f53ca7e --- /dev/null +++ b/packages/jsts/src/rules/S4619/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"in" should not be used on arrays', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4619/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4619'; diff --git a/packages/jsts/src/rules/S4619/meta.ts b/packages/jsts/src/rules/S4619/meta.ts index 3fe2f53ca7e..33cc4ff5f5c 100644 --- a/packages/jsts/src/rules/S4619/meta.ts +++ b/packages/jsts/src/rules/S4619/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"in" should not be used on arrays', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4619/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S4619'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-in-misuse'; diff --git a/packages/jsts/src/rules/S4621/generated-meta.ts b/packages/jsts/src/rules/S4621/generated-meta.ts new file mode 100644 index 00000000000..a35b3877533 --- /dev/null +++ b/packages/jsts/src/rules/S4621/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Union and intersection types should not include duplicated constituents', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4621/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4621'; diff --git a/packages/jsts/src/rules/S4621/meta.ts b/packages/jsts/src/rules/S4621/meta.ts index a35b3877533..da6821851c8 100644 --- a/packages/jsts/src/rules/S4621/meta.ts +++ b/packages/jsts/src/rules/S4621/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Union and intersection types should not include duplicated constituents', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4621/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S4621'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-duplicate-in-composite'; diff --git a/packages/jsts/src/rules/S4622/generated-meta.ts b/packages/jsts/src/rules/S4622/generated-meta.ts new file mode 100644 index 00000000000..e689f743613 --- /dev/null +++ b/packages/jsts/src/rules/S4622/generated-meta.ts @@ -0,0 +1,50 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Union types should not have too many elements', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4622/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4622'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + threshold: { + type: 'integer', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S4622/meta.ts b/packages/jsts/src/rules/S4622/meta.ts index e689f743613..c518ac3778c 100644 --- a/packages/jsts/src/rules/S4622/meta.ts +++ b/packages/jsts/src/rules/S4622/meta.ts @@ -17,34 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Union types should not have too many elements', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4622/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4622'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - threshold: { - type: 'integer', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'max-union-size'; diff --git a/packages/jsts/src/rules/S4623/generated-meta.ts b/packages/jsts/src/rules/S4623/generated-meta.ts new file mode 100644 index 00000000000..e812e1a339b --- /dev/null +++ b/packages/jsts/src/rules/S4623/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: '"undefined" should not be passed as the value of optional parameters', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4623/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4623'; diff --git a/packages/jsts/src/rules/S4623/meta.ts b/packages/jsts/src/rules/S4623/meta.ts index e812e1a339b..410f680a8c1 100644 --- a/packages/jsts/src/rules/S4623/meta.ts +++ b/packages/jsts/src/rules/S4623/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: '"undefined" should not be passed as the value of optional parameters', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4623/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S4623'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-undefined-argument'; diff --git a/packages/jsts/src/rules/S4624/generated-meta.ts b/packages/jsts/src/rules/S4624/generated-meta.ts new file mode 100644 index 00000000000..0de47f976e2 --- /dev/null +++ b/packages/jsts/src/rules/S4624/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Template literals should not be nested', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4624/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4624'; diff --git a/packages/jsts/src/rules/S4624/meta.ts b/packages/jsts/src/rules/S4624/meta.ts index 0de47f976e2..a35a9fd73cb 100644 --- a/packages/jsts/src/rules/S4624/meta.ts +++ b/packages/jsts/src/rules/S4624/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Template literals should not be nested', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4624/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4624'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-nested-template-literals'; diff --git a/packages/jsts/src/rules/S4634/generated-meta.ts b/packages/jsts/src/rules/S4634/generated-meta.ts new file mode 100644 index 00000000000..06eb0b2bf6b --- /dev/null +++ b/packages/jsts/src/rules/S4634/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Shorthand promises should be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4634/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4634'; diff --git a/packages/jsts/src/rules/S4634/meta.ts b/packages/jsts/src/rules/S4634/meta.ts index 06eb0b2bf6b..957b08341e9 100644 --- a/packages/jsts/src/rules/S4634/meta.ts +++ b/packages/jsts/src/rules/S4634/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Shorthand promises should be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4634/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S4634'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'prefer-promise-shorthand'; diff --git a/packages/jsts/src/rules/S4721/generated-meta.ts b/packages/jsts/src/rules/S4721/generated-meta.ts new file mode 100644 index 00000000000..36a7950f142 --- /dev/null +++ b/packages/jsts/src/rules/S4721/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Using shell interpreter when executing OS commands is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4721/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4721'; diff --git a/packages/jsts/src/rules/S4721/meta.ts b/packages/jsts/src/rules/S4721/meta.ts index 36a7950f142..e99e00868ae 100644 --- a/packages/jsts/src/rules/S4721/meta.ts +++ b/packages/jsts/src/rules/S4721/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Using shell interpreter when executing OS commands is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4721/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4721'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'os-command'; diff --git a/packages/jsts/src/rules/S4782/generated-meta.ts b/packages/jsts/src/rules/S4782/generated-meta.ts new file mode 100644 index 00000000000..093d069c6dc --- /dev/null +++ b/packages/jsts/src/rules/S4782/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: "Optional property declarations should not use both '?' and 'undefined' syntax", + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4782/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S4782'; diff --git a/packages/jsts/src/rules/S4782/meta.ts b/packages/jsts/src/rules/S4782/meta.ts index 093d069c6dc..7e0cffdba2c 100644 --- a/packages/jsts/src/rules/S4782/meta.ts +++ b/packages/jsts/src/rules/S4782/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: "Optional property declarations should not use both '?' and 'undefined' syntax", - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4782/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S4782'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-redundant-optional'; diff --git a/packages/jsts/src/rules/S4784/generated-meta.ts b/packages/jsts/src/rules/S4784/generated-meta.ts new file mode 100644 index 00000000000..cd53f4d6d69 --- /dev/null +++ b/packages/jsts/src/rules/S4784/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Using regular expressions is security-sensitive', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4784/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S4784'; diff --git a/packages/jsts/src/rules/S4784/meta.ts b/packages/jsts/src/rules/S4784/meta.ts index cd53f4d6d69..1a4afed233b 100644 --- a/packages/jsts/src/rules/S4784/meta.ts +++ b/packages/jsts/src/rules/S4784/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Using regular expressions is security-sensitive', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4784/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S4784'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'regular-expr'; diff --git a/packages/jsts/src/rules/S4787/generated-meta.ts b/packages/jsts/src/rules/S4787/generated-meta.ts new file mode 100644 index 00000000000..1d65cdced33 --- /dev/null +++ b/packages/jsts/src/rules/S4787/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Encrypting data is security-sensitive', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4787/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S4787'; diff --git a/packages/jsts/src/rules/S4787/meta.ts b/packages/jsts/src/rules/S4787/meta.ts index 1d65cdced33..463dcfcdce8 100644 --- a/packages/jsts/src/rules/S4787/meta.ts +++ b/packages/jsts/src/rules/S4787/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Encrypting data is security-sensitive', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4787/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S4787'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'encryption'; diff --git a/packages/jsts/src/rules/S4790/generated-meta.ts b/packages/jsts/src/rules/S4790/generated-meta.ts new file mode 100644 index 00000000000..f06ce1f3e8b --- /dev/null +++ b/packages/jsts/src/rules/S4790/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Using weak hashing algorithms is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4790/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4790'; diff --git a/packages/jsts/src/rules/S4790/meta.ts b/packages/jsts/src/rules/S4790/meta.ts index f06ce1f3e8b..14167859112 100644 --- a/packages/jsts/src/rules/S4790/meta.ts +++ b/packages/jsts/src/rules/S4790/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Using weak hashing algorithms is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4790/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4790'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'hashing'; diff --git a/packages/jsts/src/rules/S4798/generated-meta.ts b/packages/jsts/src/rules/S4798/generated-meta.ts new file mode 100644 index 00000000000..4ff11d8c1da --- /dev/null +++ b/packages/jsts/src/rules/S4798/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'Optional boolean parameters should have default value', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4798/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4798'; diff --git a/packages/jsts/src/rules/S4798/meta.ts b/packages/jsts/src/rules/S4798/meta.ts index 4ff11d8c1da..5ccbb8e0c84 100644 --- a/packages/jsts/src/rules/S4798/meta.ts +++ b/packages/jsts/src/rules/S4798/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'Optional boolean parameters should have default value', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4798/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4798'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'bool-param-default'; diff --git a/packages/jsts/src/rules/S4817/generated-meta.ts b/packages/jsts/src/rules/S4817/generated-meta.ts new file mode 100644 index 00000000000..240e2593621 --- /dev/null +++ b/packages/jsts/src/rules/S4817/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Executing XPath expressions is security-sensitive', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4817/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S4817'; diff --git a/packages/jsts/src/rules/S4817/meta.ts b/packages/jsts/src/rules/S4817/meta.ts index 240e2593621..3ae86e92cce 100644 --- a/packages/jsts/src/rules/S4817/meta.ts +++ b/packages/jsts/src/rules/S4817/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Executing XPath expressions is security-sensitive', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4817/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S4817'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'xpath'; diff --git a/packages/jsts/src/rules/S4818/generated-meta.ts b/packages/jsts/src/rules/S4818/generated-meta.ts new file mode 100644 index 00000000000..189c7657d7b --- /dev/null +++ b/packages/jsts/src/rules/S4818/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Using Sockets is security-sensitive', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4818/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S4818'; diff --git a/packages/jsts/src/rules/S4818/meta.ts b/packages/jsts/src/rules/S4818/meta.ts index 189c7657d7b..cd251da402d 100644 --- a/packages/jsts/src/rules/S4818/meta.ts +++ b/packages/jsts/src/rules/S4818/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Using Sockets is security-sensitive', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4818/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S4818'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'sockets'; diff --git a/packages/jsts/src/rules/S4822/generated-meta.ts b/packages/jsts/src/rules/S4822/generated-meta.ts new file mode 100644 index 00000000000..9da2662b166 --- /dev/null +++ b/packages/jsts/src/rules/S4822/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Promise rejections should not be caught by "try" blocks', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4822/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S4822'; diff --git a/packages/jsts/src/rules/S4822/meta.ts b/packages/jsts/src/rules/S4822/meta.ts index 9da2662b166..01a54dc609c 100644 --- a/packages/jsts/src/rules/S4822/meta.ts +++ b/packages/jsts/src/rules/S4822/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Promise rejections should not be caught by "try" blocks', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4822/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S4822'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-try-promise'; diff --git a/packages/jsts/src/rules/S4823/generated-meta.ts b/packages/jsts/src/rules/S4823/generated-meta.ts new file mode 100644 index 00000000000..c7036fdb708 --- /dev/null +++ b/packages/jsts/src/rules/S4823/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Using command line arguments is security-sensitive', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4823/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S4823'; diff --git a/packages/jsts/src/rules/S4823/meta.ts b/packages/jsts/src/rules/S4823/meta.ts index c7036fdb708..8a325142cd8 100644 --- a/packages/jsts/src/rules/S4823/meta.ts +++ b/packages/jsts/src/rules/S4823/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Using command line arguments is security-sensitive', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4823/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S4823'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'process-argv'; diff --git a/packages/jsts/src/rules/S4829/generated-meta.ts b/packages/jsts/src/rules/S4829/generated-meta.ts new file mode 100644 index 00000000000..2d6524c796f --- /dev/null +++ b/packages/jsts/src/rules/S4829/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Reading the Standard Input is security-sensitive', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4829/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S4829'; diff --git a/packages/jsts/src/rules/S4829/meta.ts b/packages/jsts/src/rules/S4829/meta.ts index 2d6524c796f..b0a36f1ee6c 100644 --- a/packages/jsts/src/rules/S4829/meta.ts +++ b/packages/jsts/src/rules/S4829/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Reading the Standard Input is security-sensitive', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4829/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S4829'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'standard-input'; diff --git a/packages/jsts/src/rules/S4830/generated-meta.ts b/packages/jsts/src/rules/S4830/generated-meta.ts new file mode 100644 index 00000000000..0391aaf2142 --- /dev/null +++ b/packages/jsts/src/rules/S4830/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Server certificates should be verified during SSL/TLS connections', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S4830/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S4830'; diff --git a/packages/jsts/src/rules/S4830/meta.ts b/packages/jsts/src/rules/S4830/meta.ts index 0391aaf2142..1cdbafe6a3b 100644 --- a/packages/jsts/src/rules/S4830/meta.ts +++ b/packages/jsts/src/rules/S4830/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Server certificates should be verified during SSL/TLS connections', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S4830/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S4830'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'unverified-certificate'; diff --git a/packages/jsts/src/rules/S5042/generated-meta.ts b/packages/jsts/src/rules/S5042/generated-meta.ts new file mode 100644 index 00000000000..16b0c85c62f --- /dev/null +++ b/packages/jsts/src/rules/S5042/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: + 'Expanding archive files without controlling resource consumption is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5042/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5042'; diff --git a/packages/jsts/src/rules/S5042/meta.ts b/packages/jsts/src/rules/S5042/meta.ts index 16b0c85c62f..3f85228c3b1 100644 --- a/packages/jsts/src/rules/S5042/meta.ts +++ b/packages/jsts/src/rules/S5042/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: - 'Expanding archive files without controlling resource consumption is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5042/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5042'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-unsafe-unzip'; diff --git a/packages/jsts/src/rules/S5122/generated-meta.ts b/packages/jsts/src/rules/S5122/generated-meta.ts new file mode 100644 index 00000000000..5de669b7b59 --- /dev/null +++ b/packages/jsts/src/rules/S5122/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Having a permissive Cross-Origin Resource Sharing policy is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5122/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5122'; diff --git a/packages/jsts/src/rules/S5122/meta.ts b/packages/jsts/src/rules/S5122/meta.ts index 5de669b7b59..780f65d02a3 100644 --- a/packages/jsts/src/rules/S5122/meta.ts +++ b/packages/jsts/src/rules/S5122/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Having a permissive Cross-Origin Resource Sharing policy is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5122/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5122'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'cors'; diff --git a/packages/jsts/src/rules/S5148/generated-meta.ts b/packages/jsts/src/rules/S5148/generated-meta.ts new file mode 100644 index 00000000000..6167c7e5e00 --- /dev/null +++ b/packages/jsts/src/rules/S5148/generated-meta.ts @@ -0,0 +1,34 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: + 'Authorizing an opened window to access back to the originating window is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5148/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5148'; diff --git a/packages/jsts/src/rules/S5148/meta.ts b/packages/jsts/src/rules/S5148/meta.ts index 6167c7e5e00..a1eef0326ba 100644 --- a/packages/jsts/src/rules/S5148/meta.ts +++ b/packages/jsts/src/rules/S5148/meta.ts @@ -17,18 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: - 'Authorizing an opened window to access back to the originating window is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5148/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5148'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'link-with-target-blank'; diff --git a/packages/jsts/src/rules/S5247/generated-meta.ts b/packages/jsts/src/rules/S5247/generated-meta.ts new file mode 100644 index 00000000000..6b85e4c7e79 --- /dev/null +++ b/packages/jsts/src/rules/S5247/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Disabling auto-escaping in template engines is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5247/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5247'; diff --git a/packages/jsts/src/rules/S5247/meta.ts b/packages/jsts/src/rules/S5247/meta.ts index 6b85e4c7e79..7edc4ca1f74 100644 --- a/packages/jsts/src/rules/S5247/meta.ts +++ b/packages/jsts/src/rules/S5247/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Disabling auto-escaping in template engines is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5247/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5247'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'disabled-auto-escaping'; diff --git a/packages/jsts/src/rules/S5254/generated-meta.ts b/packages/jsts/src/rules/S5254/generated-meta.ts new file mode 100644 index 00000000000..8be9e8d9d4b --- /dev/null +++ b/packages/jsts/src/rules/S5254/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'HTML elements should have a valid language attribute', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5254/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5254'; diff --git a/packages/jsts/src/rules/S5254/meta.ts b/packages/jsts/src/rules/S5254/meta.ts index 8be9e8d9d4b..8d499d8dc14 100644 --- a/packages/jsts/src/rules/S5254/meta.ts +++ b/packages/jsts/src/rules/S5254/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'suggestion', - docs: { - description: 'HTML elements should have a valid language attribute', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5254/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5254'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'html-has-lang'; diff --git a/packages/jsts/src/rules/S5256/generated-meta.ts b/packages/jsts/src/rules/S5256/generated-meta.ts new file mode 100644 index 00000000000..0ad326aee06 --- /dev/null +++ b/packages/jsts/src/rules/S5256/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'problem', + docs: { + description: 'Tables should have headers', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5256/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5256'; diff --git a/packages/jsts/src/rules/S5256/meta.ts b/packages/jsts/src/rules/S5256/meta.ts index 0ad326aee06..a7ae2d4db6d 100644 --- a/packages/jsts/src/rules/S5256/meta.ts +++ b/packages/jsts/src/rules/S5256/meta.ts @@ -17,17 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" - -export const meta = { - type: 'problem', - docs: { - description: 'Tables should have headers', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5256/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5256'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'table-header'; diff --git a/packages/jsts/src/rules/S5257/generated-meta.ts b/packages/jsts/src/rules/S5257/generated-meta.ts new file mode 100644 index 00000000000..0e6bf9bcb79 --- /dev/null +++ b/packages/jsts/src/rules/S5257/generated-meta.ts @@ -0,0 +1,33 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// DO NOT EDIT! This file is autogenerated by "npm run generate-meta" + +export const meta = { + type: 'suggestion', + docs: { + description: 'HTML "