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 "" should not be used for layout purposes', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5257/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5257'; diff --git a/packages/jsts/src/rules/S5257/meta.ts b/packages/jsts/src/rules/S5257/meta.ts index 0e6bf9bcb79..6d4ce70cb97 100644 --- a/packages/jsts/src/rules/S5257/meta.ts +++ b/packages/jsts/src/rules/S5257/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 "
" should not be used for layout purposes', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5257/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5257'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-table-as-layout'; diff --git a/packages/jsts/src/rules/S5260/generated-meta.ts b/packages/jsts/src/rules/S5260/generated-meta.ts new file mode 100644 index 00000000000..7ed8e018fbd --- /dev/null +++ b/packages/jsts/src/rules/S5260/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: 'Table cells should reference their headers', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5260/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5260'; diff --git a/packages/jsts/src/rules/S5260/meta.ts b/packages/jsts/src/rules/S5260/meta.ts index 7ed8e018fbd..1ae43f191d1 100644 --- a/packages/jsts/src/rules/S5260/meta.ts +++ b/packages/jsts/src/rules/S5260/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: 'Table cells should reference their headers', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5260/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5260'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'table-header-reference'; diff --git a/packages/jsts/src/rules/S5264/generated-meta.ts b/packages/jsts/src/rules/S5264/generated-meta.ts new file mode 100644 index 00000000000..bc800ea91d2 --- /dev/null +++ b/packages/jsts/src/rules/S5264/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: '"" tags should provide an alternative content', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5264/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5264'; diff --git a/packages/jsts/src/rules/S5264/meta.ts b/packages/jsts/src/rules/S5264/meta.ts index bc800ea91d2..8fb14f8c7d2 100644 --- a/packages/jsts/src/rules/S5264/meta.ts +++ b/packages/jsts/src/rules/S5264/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: '"" tags should provide an alternative content', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5264/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5264'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'object-alt-content'; diff --git a/packages/jsts/src/rules/S5332/generated-meta.ts b/packages/jsts/src/rules/S5332/generated-meta.ts new file mode 100644 index 00000000000..9618eeafed8 --- /dev/null +++ b/packages/jsts/src/rules/S5332/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 clear-text protocols is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5332/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5332'; diff --git a/packages/jsts/src/rules/S5332/meta.ts b/packages/jsts/src/rules/S5332/meta.ts index 9618eeafed8..2bb0ae6cea6 100644 --- a/packages/jsts/src/rules/S5332/meta.ts +++ b/packages/jsts/src/rules/S5332/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 clear-text protocols is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5332/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5332'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-clear-text-protocols'; diff --git a/packages/jsts/src/rules/S5443/generated-meta.ts b/packages/jsts/src/rules/S5443/generated-meta.ts new file mode 100644 index 00000000000..6f240d5c73a --- /dev/null +++ b/packages/jsts/src/rules/S5443/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 publicly writable directories is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5443/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5443'; diff --git a/packages/jsts/src/rules/S5443/meta.ts b/packages/jsts/src/rules/S5443/meta.ts index 6f240d5c73a..7b3334e6ceb 100644 --- a/packages/jsts/src/rules/S5443/meta.ts +++ b/packages/jsts/src/rules/S5443/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 publicly writable directories is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5443/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5443'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'publicly-writable-directories'; diff --git a/packages/jsts/src/rules/S5527/generated-meta.ts b/packages/jsts/src/rules/S5527/generated-meta.ts new file mode 100644 index 00000000000..417c9e2e7c6 --- /dev/null +++ b/packages/jsts/src/rules/S5527/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 hostnames should be verified during SSL/TLS connections', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5527/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5527'; diff --git a/packages/jsts/src/rules/S5527/meta.ts b/packages/jsts/src/rules/S5527/meta.ts index 417c9e2e7c6..3c150f21e65 100644 --- a/packages/jsts/src/rules/S5527/meta.ts +++ b/packages/jsts/src/rules/S5527/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 hostnames should be verified during SSL/TLS connections', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5527/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5527'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'unverified-hostname'; diff --git a/packages/jsts/src/rules/S5542/generated-meta.ts b/packages/jsts/src/rules/S5542/generated-meta.ts new file mode 100644 index 00000000000..fd053367ae0 --- /dev/null +++ b/packages/jsts/src/rules/S5542/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: 'Encryption algorithms should be used with secure mode and padding scheme', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5542/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5542'; diff --git a/packages/jsts/src/rules/S5542/meta.ts b/packages/jsts/src/rules/S5542/meta.ts index fd053367ae0..421209824e4 100644 --- a/packages/jsts/src/rules/S5542/meta.ts +++ b/packages/jsts/src/rules/S5542/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: 'Encryption algorithms should be used with secure mode and padding scheme', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5542/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5542'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'encryption-secure-mode'; diff --git a/packages/jsts/src/rules/S5547/generated-meta.ts b/packages/jsts/src/rules/S5547/generated-meta.ts new file mode 100644 index 00000000000..345935343cd --- /dev/null +++ b/packages/jsts/src/rules/S5547/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: 'Cipher algorithms should be robust', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5547/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5547'; diff --git a/packages/jsts/src/rules/S5547/meta.ts b/packages/jsts/src/rules/S5547/meta.ts index 345935343cd..9f3b6213c76 100644 --- a/packages/jsts/src/rules/S5547/meta.ts +++ b/packages/jsts/src/rules/S5547/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: 'Cipher algorithms should be robust', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5547/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5547'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-weak-cipher'; diff --git a/packages/jsts/src/rules/S5604/generated-meta.ts b/packages/jsts/src/rules/S5604/generated-meta.ts new file mode 100644 index 00000000000..82eb719e99f --- /dev/null +++ b/packages/jsts/src/rules/S5604/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: 'Using intrusive permissions is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5604/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5604'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + permissions: { + type: 'array', + items: { + type: 'string', + }, + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S5604/meta.ts b/packages/jsts/src/rules/S5604/meta.ts index 82eb719e99f..e9e1bdb89fd 100644 --- a/packages/jsts/src/rules/S5604/meta.ts +++ b/packages/jsts/src/rules/S5604/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: 'Using intrusive permissions is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5604/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5604'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - permissions: { - type: 'array', - items: { - type: 'string', - }, - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-intrusive-permissions'; diff --git a/packages/jsts/src/rules/S5659/generated-meta.ts b/packages/jsts/src/rules/S5659/generated-meta.ts new file mode 100644 index 00000000000..676024be846 --- /dev/null +++ b/packages/jsts/src/rules/S5659/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: 'JWT should be signed and verified with strong cipher algorithms', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5659/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5659'; diff --git a/packages/jsts/src/rules/S5659/meta.ts b/packages/jsts/src/rules/S5659/meta.ts index 676024be846..5e481623477 100644 --- a/packages/jsts/src/rules/S5659/meta.ts +++ b/packages/jsts/src/rules/S5659/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: 'JWT should be signed and verified with strong cipher algorithms', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5659/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5659'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'insecure-jwt-token'; diff --git a/packages/jsts/src/rules/S5689/generated-meta.ts b/packages/jsts/src/rules/S5689/generated-meta.ts new file mode 100644 index 00000000000..0eaf07c0fce --- /dev/null +++ b/packages/jsts/src/rules/S5689/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: 'Disclosing fingerprints from web application technologies is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5689/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5689'; diff --git a/packages/jsts/src/rules/S5689/meta.ts b/packages/jsts/src/rules/S5689/meta.ts index 0eaf07c0fce..011ffd7302b 100644 --- a/packages/jsts/src/rules/S5689/meta.ts +++ b/packages/jsts/src/rules/S5689/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: 'Disclosing fingerprints from web application technologies is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5689/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5689'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'x-powered-by'; diff --git a/packages/jsts/src/rules/S5691/generated-meta.ts b/packages/jsts/src/rules/S5691/generated-meta.ts new file mode 100644 index 00000000000..63f2225f2ea --- /dev/null +++ b/packages/jsts/src/rules/S5691/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: 'Statically serving hidden files is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5691/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5691'; diff --git a/packages/jsts/src/rules/S5691/meta.ts b/packages/jsts/src/rules/S5691/meta.ts index 63f2225f2ea..91a7eec2e32 100644 --- a/packages/jsts/src/rules/S5691/meta.ts +++ b/packages/jsts/src/rules/S5691/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: 'Statically serving hidden files is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5691/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5691'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'hidden-files'; diff --git a/packages/jsts/src/rules/S5693/generated-meta.ts b/packages/jsts/src/rules/S5693/generated-meta.ts new file mode 100644 index 00000000000..f013313b8ee --- /dev/null +++ b/packages/jsts/src/rules/S5693/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: 'Allowing requests with excessive content length is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5693/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5693'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + fileUploadSizeLimit: { + type: 'integer', + }, + standardSizeLimit: { + type: 'integer', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S5693/meta.ts b/packages/jsts/src/rules/S5693/meta.ts index f013313b8ee..16c3f18c52d 100644 --- a/packages/jsts/src/rules/S5693/meta.ts +++ b/packages/jsts/src/rules/S5693/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: 'Allowing requests with excessive content length is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5693/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5693'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - fileUploadSizeLimit: { - type: 'integer', - }, - standardSizeLimit: { - type: 'integer', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'content-length'; diff --git a/packages/jsts/src/rules/S5725/generated-meta.ts b/packages/jsts/src/rules/S5725/generated-meta.ts new file mode 100644 index 00000000000..b48463098db --- /dev/null +++ b/packages/jsts/src/rules/S5725/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 remote artifacts without integrity checks is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5725/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5725'; diff --git a/packages/jsts/src/rules/S5725/meta.ts b/packages/jsts/src/rules/S5725/meta.ts index b48463098db..10c596d3155 100644 --- a/packages/jsts/src/rules/S5725/meta.ts +++ b/packages/jsts/src/rules/S5725/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 remote artifacts without integrity checks is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5725/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5725'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'disabled-resource-integrity'; diff --git a/packages/jsts/src/rules/S5728/generated-meta.ts b/packages/jsts/src/rules/S5728/generated-meta.ts new file mode 100644 index 00000000000..f3ae2be67d2 --- /dev/null +++ b/packages/jsts/src/rules/S5728/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 content security policy fetch directives is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5728/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5728'; diff --git a/packages/jsts/src/rules/S5728/meta.ts b/packages/jsts/src/rules/S5728/meta.ts index f3ae2be67d2..bae55ea0d17 100644 --- a/packages/jsts/src/rules/S5728/meta.ts +++ b/packages/jsts/src/rules/S5728/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 content security policy fetch directives is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5728/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5728'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'content-security-policy'; diff --git a/packages/jsts/src/rules/S5730/generated-meta.ts b/packages/jsts/src/rules/S5730/generated-meta.ts new file mode 100644 index 00000000000..2dcd8022ac8 --- /dev/null +++ b/packages/jsts/src/rules/S5730/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: 'Allowing mixed-content is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5730/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5730'; diff --git a/packages/jsts/src/rules/S5730/meta.ts b/packages/jsts/src/rules/S5730/meta.ts index 2dcd8022ac8..136dd1e99db 100644 --- a/packages/jsts/src/rules/S5730/meta.ts +++ b/packages/jsts/src/rules/S5730/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: 'Allowing mixed-content is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5730/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5730'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-mixed-content'; diff --git a/packages/jsts/src/rules/S5732/generated-meta.ts b/packages/jsts/src/rules/S5732/generated-meta.ts new file mode 100644 index 00000000000..d9690b5385f --- /dev/null +++ b/packages/jsts/src/rules/S5732/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: + 'Disabling content security policy frame-ancestors directive is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5732/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5732'; diff --git a/packages/jsts/src/rules/S5732/meta.ts b/packages/jsts/src/rules/S5732/meta.ts index d9690b5385f..94c88ea3b7c 100644 --- a/packages/jsts/src/rules/S5732/meta.ts +++ b/packages/jsts/src/rules/S5732/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: - 'Disabling content security policy frame-ancestors directive is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5732/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5732'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'frame-ancestors'; diff --git a/packages/jsts/src/rules/S5734/generated-meta.ts b/packages/jsts/src/rules/S5734/generated-meta.ts new file mode 100644 index 00000000000..de2056a8db0 --- /dev/null +++ b/packages/jsts/src/rules/S5734/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: 'Allowing browsers to sniff MIME types is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5734/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5734'; diff --git a/packages/jsts/src/rules/S5734/meta.ts b/packages/jsts/src/rules/S5734/meta.ts index de2056a8db0..79bb1df4f2b 100644 --- a/packages/jsts/src/rules/S5734/meta.ts +++ b/packages/jsts/src/rules/S5734/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: 'Allowing browsers to sniff MIME types is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5734/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5734'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-mime-sniff'; diff --git a/packages/jsts/src/rules/S5736/generated-meta.ts b/packages/jsts/src/rules/S5736/generated-meta.ts new file mode 100644 index 00000000000..ded7e68432a --- /dev/null +++ b/packages/jsts/src/rules/S5736/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 strict HTTP no-referrer policy is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5736/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5736'; diff --git a/packages/jsts/src/rules/S5736/meta.ts b/packages/jsts/src/rules/S5736/meta.ts index ded7e68432a..a6da1c1ccac 100644 --- a/packages/jsts/src/rules/S5736/meta.ts +++ b/packages/jsts/src/rules/S5736/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 strict HTTP no-referrer policy is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5736/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5736'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-referrer-policy'; diff --git a/packages/jsts/src/rules/S5739/generated-meta.ts b/packages/jsts/src/rules/S5739/generated-meta.ts new file mode 100644 index 00000000000..bb36c409b14 --- /dev/null +++ b/packages/jsts/src/rules/S5739/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 Strict-Transport-Security policy is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5739/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5739'; diff --git a/packages/jsts/src/rules/S5739/meta.ts b/packages/jsts/src/rules/S5739/meta.ts index bb36c409b14..56a15dc409e 100644 --- a/packages/jsts/src/rules/S5739/meta.ts +++ b/packages/jsts/src/rules/S5739/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 Strict-Transport-Security policy is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5739/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5739'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'strict-transport-security'; diff --git a/packages/jsts/src/rules/S5742/generated-meta.ts b/packages/jsts/src/rules/S5742/generated-meta.ts new file mode 100644 index 00000000000..e5cee9e3495 --- /dev/null +++ b/packages/jsts/src/rules/S5742/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 Certificate Transparency monitoring is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5742/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5742'; diff --git a/packages/jsts/src/rules/S5742/meta.ts b/packages/jsts/src/rules/S5742/meta.ts index e5cee9e3495..2eca981e34a 100644 --- a/packages/jsts/src/rules/S5742/meta.ts +++ b/packages/jsts/src/rules/S5742/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 Certificate Transparency monitoring is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5742/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5742'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'certificate-transparency'; diff --git a/packages/jsts/src/rules/S5743/generated-meta.ts b/packages/jsts/src/rules/S5743/generated-meta.ts new file mode 100644 index 00000000000..712349a80aa --- /dev/null +++ b/packages/jsts/src/rules/S5743/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: 'Allowing browsers to perform DNS prefetching is security-sensitive', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5743/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S5743'; diff --git a/packages/jsts/src/rules/S5743/meta.ts b/packages/jsts/src/rules/S5743/meta.ts index 712349a80aa..3737af9e911 100644 --- a/packages/jsts/src/rules/S5743/meta.ts +++ b/packages/jsts/src/rules/S5743/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: 'Allowing browsers to perform DNS prefetching is security-sensitive', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5743/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S5743'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'dns-prefetching'; diff --git a/packages/jsts/src/rules/S5757/generated-meta.ts b/packages/jsts/src/rules/S5757/generated-meta.ts new file mode 100644 index 00000000000..819e050f6c4 --- /dev/null +++ b/packages/jsts/src/rules/S5757/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: 'Allowing confidential information to be logged is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5757/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5757'; diff --git a/packages/jsts/src/rules/S5757/meta.ts b/packages/jsts/src/rules/S5757/meta.ts index 819e050f6c4..03c0c402843 100644 --- a/packages/jsts/src/rules/S5757/meta.ts +++ b/packages/jsts/src/rules/S5757/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: 'Allowing confidential information to be logged is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5757/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5757'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'confidential-information-logging'; diff --git a/packages/jsts/src/rules/S5759/generated-meta.ts b/packages/jsts/src/rules/S5759/generated-meta.ts new file mode 100644 index 00000000000..8d380972347 --- /dev/null +++ b/packages/jsts/src/rules/S5759/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: 'Forwarding client IP address is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5759/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5759'; diff --git a/packages/jsts/src/rules/S5759/meta.ts b/packages/jsts/src/rules/S5759/meta.ts index 8d380972347..22f06252a76 100644 --- a/packages/jsts/src/rules/S5759/meta.ts +++ b/packages/jsts/src/rules/S5759/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: 'Forwarding client IP address is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5759/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5759'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-ip-forward'; diff --git a/packages/jsts/src/rules/S5842/generated-meta.ts b/packages/jsts/src/rules/S5842/generated-meta.ts new file mode 100644 index 00000000000..f0ba7504263 --- /dev/null +++ b/packages/jsts/src/rules/S5842/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: 'Repeated patterns in regular expressions should not match the empty string', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5842/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5842'; diff --git a/packages/jsts/src/rules/S5842/meta.ts b/packages/jsts/src/rules/S5842/meta.ts index f0ba7504263..94a1ee24af7 100644 --- a/packages/jsts/src/rules/S5842/meta.ts +++ b/packages/jsts/src/rules/S5842/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: 'Repeated patterns in regular expressions should not match the empty string', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5842/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5842'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'empty-string-repetition'; diff --git a/packages/jsts/src/rules/S5843/generated-meta.ts b/packages/jsts/src/rules/S5843/generated-meta.ts new file mode 100644 index 00000000000..0c634061def --- /dev/null +++ b/packages/jsts/src/rules/S5843/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: 'Regular expressions should not be too complicated', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5843/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5843'; +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/S5843/meta.ts b/packages/jsts/src/rules/S5843/meta.ts index 0c634061def..04bdf97eede 100644 --- a/packages/jsts/src/rules/S5843/meta.ts +++ b/packages/jsts/src/rules/S5843/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: 'Regular expressions should not be too complicated', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5843/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5843'; -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 = 'regex-complexity'; diff --git a/packages/jsts/src/rules/S5850/generated-meta.ts b/packages/jsts/src/rules/S5850/generated-meta.ts new file mode 100644 index 00000000000..333155ce35a --- /dev/null +++ b/packages/jsts/src/rules/S5850/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: 'Alternatives in regular expressions should be grouped when used with anchors', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5850/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5850'; diff --git a/packages/jsts/src/rules/S5850/meta.ts b/packages/jsts/src/rules/S5850/meta.ts index 333155ce35a..009a603ec58 100644 --- a/packages/jsts/src/rules/S5850/meta.ts +++ b/packages/jsts/src/rules/S5850/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: 'Alternatives in regular expressions should be grouped when used with anchors', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5850/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5850'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'anchor-precedence'; diff --git a/packages/jsts/src/rules/S5852/generated-meta.ts b/packages/jsts/src/rules/S5852/generated-meta.ts new file mode 100644 index 00000000000..1cb7ec9bbf3 --- /dev/null +++ b/packages/jsts/src/rules/S5852/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 slow regular expressions is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5852/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5852'; diff --git a/packages/jsts/src/rules/S5852/meta.ts b/packages/jsts/src/rules/S5852/meta.ts index 1cb7ec9bbf3..407f193683a 100644 --- a/packages/jsts/src/rules/S5852/meta.ts +++ b/packages/jsts/src/rules/S5852/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 slow regular expressions is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5852/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5852'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'slow-regex'; diff --git a/packages/jsts/src/rules/S5856/generated-meta.ts b/packages/jsts/src/rules/S5856/generated-meta.ts new file mode 100644 index 00000000000..cf0446d6736 --- /dev/null +++ b/packages/jsts/src/rules/S5856/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: 'Regular expressions should be syntactically valid', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5856/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5856'; diff --git a/packages/jsts/src/rules/S5856/meta.ts b/packages/jsts/src/rules/S5856/meta.ts index cf0446d6736..6af4ab9639b 100644 --- a/packages/jsts/src/rules/S5856/meta.ts +++ b/packages/jsts/src/rules/S5856/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: 'Regular expressions should be syntactically valid', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5856/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5856'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-invalid-regexp'; diff --git a/packages/jsts/src/rules/S5860/generated-meta.ts b/packages/jsts/src/rules/S5860/generated-meta.ts new file mode 100644 index 00000000000..19b9ee82a1b --- /dev/null +++ b/packages/jsts/src/rules/S5860/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: 'Names of regular expressions named groups should be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5860/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5860'; diff --git a/packages/jsts/src/rules/S5860/meta.ts b/packages/jsts/src/rules/S5860/meta.ts index 19b9ee82a1b..00257dd025f 100644 --- a/packages/jsts/src/rules/S5860/meta.ts +++ b/packages/jsts/src/rules/S5860/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: 'Names of regular expressions named groups should be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5860/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5860'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'unused-named-groups'; diff --git a/packages/jsts/src/rules/S5863/generated-meta.ts b/packages/jsts/src/rules/S5863/generated-meta.ts new file mode 100644 index 00000000000..9b6b98d55d4 --- /dev/null +++ b/packages/jsts/src/rules/S5863/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: 'Assertions should not be given twice the same argument', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5863/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5863'; diff --git a/packages/jsts/src/rules/S5863/meta.ts b/packages/jsts/src/rules/S5863/meta.ts index 9b6b98d55d4..7180b9e85a5 100644 --- a/packages/jsts/src/rules/S5863/meta.ts +++ b/packages/jsts/src/rules/S5863/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: 'Assertions should not be given twice the same argument', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5863/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5863'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-same-argument-assert'; diff --git a/packages/jsts/src/rules/S5867/generated-meta.ts b/packages/jsts/src/rules/S5867/generated-meta.ts new file mode 100644 index 00000000000..c0cf523d485 --- /dev/null +++ b/packages/jsts/src/rules/S5867/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: + 'Regular expressions using Unicode character classes or property escapes should enable the unicode flag', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5867/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5867'; diff --git a/packages/jsts/src/rules/S5867/meta.ts b/packages/jsts/src/rules/S5867/meta.ts index c0cf523d485..6513b13c0fc 100644 --- a/packages/jsts/src/rules/S5867/meta.ts +++ b/packages/jsts/src/rules/S5867/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: - 'Regular expressions using Unicode character classes or property escapes should enable the unicode flag', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5867/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5867'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'unicode-aware-regex'; diff --git a/packages/jsts/src/rules/S5868/generated-meta.ts b/packages/jsts/src/rules/S5868/generated-meta.ts new file mode 100644 index 00000000000..c9be1852fe6 --- /dev/null +++ b/packages/jsts/src/rules/S5868/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: 'Unicode Grapheme Clusters should be avoided inside regex character classes', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5868/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5868'; diff --git a/packages/jsts/src/rules/S5868/meta.ts b/packages/jsts/src/rules/S5868/meta.ts index c9be1852fe6..87600bd2b88 100644 --- a/packages/jsts/src/rules/S5868/meta.ts +++ b/packages/jsts/src/rules/S5868/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: 'Unicode Grapheme Clusters should be avoided inside regex character classes', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5868/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5868'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-misleading-character-class'; diff --git a/packages/jsts/src/rules/S5869/generated-meta.ts b/packages/jsts/src/rules/S5869/generated-meta.ts new file mode 100644 index 00000000000..44ff1f3709d --- /dev/null +++ b/packages/jsts/src/rules/S5869/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: + 'Character classes in regular expressions should not contain the same character twice', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5869/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S5869'; diff --git a/packages/jsts/src/rules/S5869/meta.ts b/packages/jsts/src/rules/S5869/meta.ts index 44ff1f3709d..a6f2a9e2fc3 100644 --- a/packages/jsts/src/rules/S5869/meta.ts +++ b/packages/jsts/src/rules/S5869/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: - 'Character classes in regular expressions should not contain the same character twice', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5869/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S5869'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'duplicates-in-character-class'; diff --git a/packages/jsts/src/rules/S5876/generated-meta.ts b/packages/jsts/src/rules/S5876/generated-meta.ts new file mode 100644 index 00000000000..9252a6084ea --- /dev/null +++ b/packages/jsts/src/rules/S5876/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 new session should be created during user authentication', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5876/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5876'; diff --git a/packages/jsts/src/rules/S5876/meta.ts b/packages/jsts/src/rules/S5876/meta.ts index 9252a6084ea..8daa74af74c 100644 --- a/packages/jsts/src/rules/S5876/meta.ts +++ b/packages/jsts/src/rules/S5876/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 new session should be created during user authentication', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5876/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5876'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'session-regeneration'; diff --git a/packages/jsts/src/rules/S5958/generated-meta.ts b/packages/jsts/src/rules/S5958/generated-meta.ts new file mode 100644 index 00000000000..511d61594e1 --- /dev/null +++ b/packages/jsts/src/rules/S5958/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 check which exception is thrown', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5958/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5958'; diff --git a/packages/jsts/src/rules/S5958/meta.ts b/packages/jsts/src/rules/S5958/meta.ts index 511d61594e1..6a12555f9df 100644 --- a/packages/jsts/src/rules/S5958/meta.ts +++ b/packages/jsts/src/rules/S5958/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 check which exception is thrown', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5958/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5958'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'test-check-exception'; diff --git a/packages/jsts/src/rules/S5973/generated-meta.ts b/packages/jsts/src/rules/S5973/generated-meta.ts new file mode 100644 index 00000000000..9a3c4fdc296 --- /dev/null +++ b/packages/jsts/src/rules/S5973/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 be stable', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S5973/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S5973'; diff --git a/packages/jsts/src/rules/S5973/meta.ts b/packages/jsts/src/rules/S5973/meta.ts index 9a3c4fdc296..761d59dbc1e 100644 --- a/packages/jsts/src/rules/S5973/meta.ts +++ b/packages/jsts/src/rules/S5973/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 be stable', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S5973/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S5973'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'stable-tests'; diff --git a/packages/jsts/src/rules/S6019/generated-meta.ts b/packages/jsts/src/rules/S6019/generated-meta.ts new file mode 100644 index 00000000000..5a2bb9cced3 --- /dev/null +++ b/packages/jsts/src/rules/S6019/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: + "Reluctant quantifiers in regular expressions should be followed by an expression that can't match the empty string", + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6019/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6019'; diff --git a/packages/jsts/src/rules/S6019/meta.ts b/packages/jsts/src/rules/S6019/meta.ts index 5a2bb9cced3..339dae8c79d 100644 --- a/packages/jsts/src/rules/S6019/meta.ts +++ b/packages/jsts/src/rules/S6019/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: - "Reluctant quantifiers in regular expressions should be followed by an expression that can't match the empty string", - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6019/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6019'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-empty-after-reluctant'; diff --git a/packages/jsts/src/rules/S6035/generated-meta.ts b/packages/jsts/src/rules/S6035/generated-meta.ts new file mode 100644 index 00000000000..e5b5a345ddc --- /dev/null +++ b/packages/jsts/src/rules/S6035/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: + 'Single-character alternations in regular expressions should be replaced with character classes', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6035/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6035'; diff --git a/packages/jsts/src/rules/S6035/meta.ts b/packages/jsts/src/rules/S6035/meta.ts index e5b5a345ddc..0165035aebb 100644 --- a/packages/jsts/src/rules/S6035/meta.ts +++ b/packages/jsts/src/rules/S6035/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: - 'Single-character alternations in regular expressions should be replaced with character classes', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6035/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6035'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'single-character-alternation'; diff --git a/packages/jsts/src/rules/S6079/generated-meta.ts b/packages/jsts/src/rules/S6079/generated-meta.ts new file mode 100644 index 00000000000..7d093b5277c --- /dev/null +++ b/packages/jsts/src/rules/S6079/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 execute any code after "done()" is called', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6079/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6079'; diff --git a/packages/jsts/src/rules/S6079/meta.ts b/packages/jsts/src/rules/S6079/meta.ts index 7d093b5277c..be7037c4abd 100644 --- a/packages/jsts/src/rules/S6079/meta.ts +++ b/packages/jsts/src/rules/S6079/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 execute any code after "done()" is called', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6079/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6079'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-code-after-done'; diff --git a/packages/jsts/src/rules/S6080/generated-meta.ts b/packages/jsts/src/rules/S6080/generated-meta.ts new file mode 100644 index 00000000000..97ed2fec149 --- /dev/null +++ b/packages/jsts/src/rules/S6080/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 Mocha timeouts should be explicit', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6080/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6080'; diff --git a/packages/jsts/src/rules/S6080/meta.ts b/packages/jsts/src/rules/S6080/meta.ts index 97ed2fec149..20e7541522c 100644 --- a/packages/jsts/src/rules/S6080/meta.ts +++ b/packages/jsts/src/rules/S6080/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 Mocha timeouts should be explicit', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6080/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6080'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'disabled-timeout'; diff --git a/packages/jsts/src/rules/S6092/generated-meta.ts b/packages/jsts/src/rules/S6092/generated-meta.ts new file mode 100644 index 00000000000..531ace982ba --- /dev/null +++ b/packages/jsts/src/rules/S6092/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: 'Chai assertions should have only one reason to succeed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6092/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6092'; diff --git a/packages/jsts/src/rules/S6092/meta.ts b/packages/jsts/src/rules/S6092/meta.ts index 531ace982ba..3e7095e526f 100644 --- a/packages/jsts/src/rules/S6092/meta.ts +++ b/packages/jsts/src/rules/S6092/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: 'Chai assertions should have only one reason to succeed', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6092/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6092'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'chai-determinate-assertion'; diff --git a/packages/jsts/src/rules/S6245/generated-meta.ts b/packages/jsts/src/rules/S6245/generated-meta.ts new file mode 100644 index 00000000000..170b514bdc7 --- /dev/null +++ b/packages/jsts/src/rules/S6245/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: 'Disabling server-side encryption of S3 buckets is security-sensitive', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6245/javascript', + requiresTypeChecking: false, + }, + deprecated: true, +}; + +export const sonarKey = 'S6245'; diff --git a/packages/jsts/src/rules/S6245/meta.ts b/packages/jsts/src/rules/S6245/meta.ts index 170b514bdc7..0fa24224aff 100644 --- a/packages/jsts/src/rules/S6245/meta.ts +++ b/packages/jsts/src/rules/S6245/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: 'Disabling server-side encryption of S3 buckets is security-sensitive', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6245/javascript', - requiresTypeChecking: false, - }, - deprecated: true, -}; - -export const sonarKey = 'S6245'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-s3-bucket-server-encryption'; diff --git a/packages/jsts/src/rules/S6249/generated-meta.ts b/packages/jsts/src/rules/S6249/generated-meta.ts new file mode 100644 index 00000000000..c3b7b5277df --- /dev/null +++ b/packages/jsts/src/rules/S6249/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: 'Authorizing HTTP communications with S3 buckets is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6249/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6249'; diff --git a/packages/jsts/src/rules/S6249/meta.ts b/packages/jsts/src/rules/S6249/meta.ts index c3b7b5277df..93618bab9c5 100644 --- a/packages/jsts/src/rules/S6249/meta.ts +++ b/packages/jsts/src/rules/S6249/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: 'Authorizing HTTP communications with S3 buckets is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6249/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6249'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-s3-bucket-insecure-http'; diff --git a/packages/jsts/src/rules/S6252/generated-meta.ts b/packages/jsts/src/rules/S6252/generated-meta.ts new file mode 100644 index 00000000000..74944b92e74 --- /dev/null +++ b/packages/jsts/src/rules/S6252/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 versioning of S3 buckets is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6252/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6252'; diff --git a/packages/jsts/src/rules/S6252/meta.ts b/packages/jsts/src/rules/S6252/meta.ts index 74944b92e74..c5511711870 100644 --- a/packages/jsts/src/rules/S6252/meta.ts +++ b/packages/jsts/src/rules/S6252/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 versioning of S3 buckets is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6252/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6252'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-s3-bucket-versioning'; diff --git a/packages/jsts/src/rules/S6265/generated-meta.ts b/packages/jsts/src/rules/S6265/generated-meta.ts new file mode 100644 index 00000000000..d0267142ce9 --- /dev/null +++ b/packages/jsts/src/rules/S6265/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: + 'Granting access to S3 buckets to all or authenticated users is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6265/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6265'; diff --git a/packages/jsts/src/rules/S6265/meta.ts b/packages/jsts/src/rules/S6265/meta.ts index d0267142ce9..7a70d4a0fc4 100644 --- a/packages/jsts/src/rules/S6265/meta.ts +++ b/packages/jsts/src/rules/S6265/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: - 'Granting access to S3 buckets to all or authenticated users is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6265/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6265'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-s3-bucket-granted-access'; diff --git a/packages/jsts/src/rules/S6268/generated-meta.ts b/packages/jsts/src/rules/S6268/generated-meta.ts new file mode 100644 index 00000000000..44dec916c05 --- /dev/null +++ b/packages/jsts/src/rules/S6268/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 Angular built-in sanitization is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6268/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6268'; diff --git a/packages/jsts/src/rules/S6268/meta.ts b/packages/jsts/src/rules/S6268/meta.ts index 44dec916c05..327d7673838 100644 --- a/packages/jsts/src/rules/S6268/meta.ts +++ b/packages/jsts/src/rules/S6268/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 Angular built-in sanitization is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6268/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6268'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-angular-bypass-sanitization'; diff --git a/packages/jsts/src/rules/S6270/generated-meta.ts b/packages/jsts/src/rules/S6270/generated-meta.ts new file mode 100644 index 00000000000..91cc45745ae --- /dev/null +++ b/packages/jsts/src/rules/S6270/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: 'Policies authorizing public access to resources are security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6270/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6270'; diff --git a/packages/jsts/src/rules/S6270/meta.ts b/packages/jsts/src/rules/S6270/meta.ts index 91cc45745ae..89b39077f6b 100644 --- a/packages/jsts/src/rules/S6270/meta.ts +++ b/packages/jsts/src/rules/S6270/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: 'Policies authorizing public access to resources are security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6270/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6270'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-iam-public-access'; diff --git a/packages/jsts/src/rules/S6275/generated-meta.ts b/packages/jsts/src/rules/S6275/generated-meta.ts new file mode 100644 index 00000000000..bde57359c6e --- /dev/null +++ b/packages/jsts/src/rules/S6275/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 unencrypted EBS volumes is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6275/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6275'; diff --git a/packages/jsts/src/rules/S6275/meta.ts b/packages/jsts/src/rules/S6275/meta.ts index bde57359c6e..8081057613e 100644 --- a/packages/jsts/src/rules/S6275/meta.ts +++ b/packages/jsts/src/rules/S6275/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 unencrypted EBS volumes is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6275/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6275'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-ec2-unencrypted-ebs-volume'; diff --git a/packages/jsts/src/rules/S6281/generated-meta.ts b/packages/jsts/src/rules/S6281/generated-meta.ts new file mode 100644 index 00000000000..71d0a4e36f4 --- /dev/null +++ b/packages/jsts/src/rules/S6281/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: 'Allowing public ACLs or policies on a S3 bucket is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6281/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6281'; diff --git a/packages/jsts/src/rules/S6281/meta.ts b/packages/jsts/src/rules/S6281/meta.ts index 71d0a4e36f4..106101ffaa1 100644 --- a/packages/jsts/src/rules/S6281/meta.ts +++ b/packages/jsts/src/rules/S6281/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: 'Allowing public ACLs or policies on a S3 bucket is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6281/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6281'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-s3-bucket-public-access'; diff --git a/packages/jsts/src/rules/S6299/generated-meta.ts b/packages/jsts/src/rules/S6299/generated-meta.ts new file mode 100644 index 00000000000..390069916f8 --- /dev/null +++ b/packages/jsts/src/rules/S6299/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 Vue.js built-in escaping is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6299/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6299'; diff --git a/packages/jsts/src/rules/S6299/meta.ts b/packages/jsts/src/rules/S6299/meta.ts index 390069916f8..094ff8ef5dd 100644 --- a/packages/jsts/src/rules/S6299/meta.ts +++ b/packages/jsts/src/rules/S6299/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 Vue.js built-in escaping is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6299/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6299'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-vue-bypass-sanitization'; diff --git a/packages/jsts/src/rules/S6302/generated-meta.ts b/packages/jsts/src/rules/S6302/generated-meta.ts new file mode 100644 index 00000000000..040835bb6f9 --- /dev/null +++ b/packages/jsts/src/rules/S6302/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: 'Policies granting all privileges are security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6302/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6302'; diff --git a/packages/jsts/src/rules/S6302/meta.ts b/packages/jsts/src/rules/S6302/meta.ts index 040835bb6f9..87117ab127e 100644 --- a/packages/jsts/src/rules/S6302/meta.ts +++ b/packages/jsts/src/rules/S6302/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: 'Policies granting all privileges are security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6302/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6302'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-iam-all-privileges'; diff --git a/packages/jsts/src/rules/S6303/generated-meta.ts b/packages/jsts/src/rules/S6303/generated-meta.ts new file mode 100644 index 00000000000..a2b5686bea1 --- /dev/null +++ b/packages/jsts/src/rules/S6303/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 unencrypted RDS DB resources is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6303/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6303'; diff --git a/packages/jsts/src/rules/S6303/meta.ts b/packages/jsts/src/rules/S6303/meta.ts index a2b5686bea1..5c4e3db163e 100644 --- a/packages/jsts/src/rules/S6303/meta.ts +++ b/packages/jsts/src/rules/S6303/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 unencrypted RDS DB resources is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6303/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6303'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-rds-unencrypted-databases'; diff --git a/packages/jsts/src/rules/S6304/generated-meta.ts b/packages/jsts/src/rules/S6304/generated-meta.ts new file mode 100644 index 00000000000..9e283b02591 --- /dev/null +++ b/packages/jsts/src/rules/S6304/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: 'Policies granting access to all resources of an account are security-sensitive', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6304/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6304'; diff --git a/packages/jsts/src/rules/S6304/meta.ts b/packages/jsts/src/rules/S6304/meta.ts index 9e283b02591..f0ac806e89c 100644 --- a/packages/jsts/src/rules/S6304/meta.ts +++ b/packages/jsts/src/rules/S6304/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: 'Policies granting access to all resources of an account are security-sensitive', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6304/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6304'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-iam-all-resources-accessible'; diff --git a/packages/jsts/src/rules/S6308/generated-meta.ts b/packages/jsts/src/rules/S6308/generated-meta.ts new file mode 100644 index 00000000000..c7027b34309 --- /dev/null +++ b/packages/jsts/src/rules/S6308/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 unencrypted Elasticsearch domains is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6308/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6308'; diff --git a/packages/jsts/src/rules/S6308/meta.ts b/packages/jsts/src/rules/S6308/meta.ts index c7027b34309..cb0aa0e2671 100644 --- a/packages/jsts/src/rules/S6308/meta.ts +++ b/packages/jsts/src/rules/S6308/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 unencrypted Elasticsearch domains is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6308/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6308'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-opensearchservice-domain'; diff --git a/packages/jsts/src/rules/S6317/generated-meta.ts b/packages/jsts/src/rules/S6317/generated-meta.ts new file mode 100644 index 00000000000..240a0b60ea6 --- /dev/null +++ b/packages/jsts/src/rules/S6317/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: 'AWS IAM policies should limit the scope of permissions given', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6317/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6317'; diff --git a/packages/jsts/src/rules/S6317/meta.ts b/packages/jsts/src/rules/S6317/meta.ts index 240a0b60ea6..2f7d73d2854 100644 --- a/packages/jsts/src/rules/S6317/meta.ts +++ b/packages/jsts/src/rules/S6317/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: 'AWS IAM policies should limit the scope of permissions given', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6317/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6317'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-iam-privilege-escalation'; diff --git a/packages/jsts/src/rules/S6319/generated-meta.ts b/packages/jsts/src/rules/S6319/generated-meta.ts new file mode 100644 index 00000000000..0d411d7f4bf --- /dev/null +++ b/packages/jsts/src/rules/S6319/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 unencrypted SageMaker notebook instances is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6319/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6319'; diff --git a/packages/jsts/src/rules/S6319/meta.ts b/packages/jsts/src/rules/S6319/meta.ts index 0d411d7f4bf..9f4628fe44a 100644 --- a/packages/jsts/src/rules/S6319/meta.ts +++ b/packages/jsts/src/rules/S6319/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 unencrypted SageMaker notebook instances is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6319/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6319'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-sagemaker-unencrypted-notebook'; diff --git a/packages/jsts/src/rules/S6321/generated-meta.ts b/packages/jsts/src/rules/S6321/generated-meta.ts new file mode 100644 index 00000000000..2e0db2ef827 --- /dev/null +++ b/packages/jsts/src/rules/S6321/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: 'Administration services access should be restricted to specific IP addresses', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6321/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6321'; diff --git a/packages/jsts/src/rules/S6321/meta.ts b/packages/jsts/src/rules/S6321/meta.ts index 2e0db2ef827..f92c822fc8a 100644 --- a/packages/jsts/src/rules/S6321/meta.ts +++ b/packages/jsts/src/rules/S6321/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: 'Administration services access should be restricted to specific IP addresses', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6321/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6321'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-restricted-ip-admin-access'; diff --git a/packages/jsts/src/rules/S6323/generated-meta.ts b/packages/jsts/src/rules/S6323/generated-meta.ts new file mode 100644 index 00000000000..7652b66158b --- /dev/null +++ b/packages/jsts/src/rules/S6323/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: 'Alternation in regular expressions should not contain empty alternatives', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6323/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6323'; diff --git a/packages/jsts/src/rules/S6323/meta.ts b/packages/jsts/src/rules/S6323/meta.ts index 7652b66158b..0ab3ddb5c16 100644 --- a/packages/jsts/src/rules/S6323/meta.ts +++ b/packages/jsts/src/rules/S6323/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: 'Alternation in regular expressions should not contain empty alternatives', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6323/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6323'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-empty-alternatives'; diff --git a/packages/jsts/src/rules/S6324/generated-meta.ts b/packages/jsts/src/rules/S6324/generated-meta.ts new file mode 100644 index 00000000000..44ad3063915 --- /dev/null +++ b/packages/jsts/src/rules/S6324/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: 'Regular expressions should not contain control characters', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6324/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6324'; diff --git a/packages/jsts/src/rules/S6324/meta.ts b/packages/jsts/src/rules/S6324/meta.ts index 44ad3063915..1a76059528e 100644 --- a/packages/jsts/src/rules/S6324/meta.ts +++ b/packages/jsts/src/rules/S6324/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: 'Regular expressions should not contain control characters', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6324/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6324'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-control-regex'; diff --git a/packages/jsts/src/rules/S6325/generated-meta.ts b/packages/jsts/src/rules/S6325/generated-meta.ts new file mode 100644 index 00000000000..f0a2ac746ff --- /dev/null +++ b/packages/jsts/src/rules/S6325/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: 'Regular expression literals should be used when possible', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6325/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6325'; diff --git a/packages/jsts/src/rules/S6325/index.ts b/packages/jsts/src/rules/S6325/index.ts new file mode 100644 index 00000000000..a37cfef5845 --- /dev/null +++ b/packages/jsts/src/rules/S6325/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-regex-literals'); diff --git a/packages/jsts/src/rules/S6325/meta.ts b/packages/jsts/src/rules/S6325/meta.ts new file mode 100644 index 00000000000..fa6bb561cd6 --- /dev/null +++ b/packages/jsts/src/rules/S6325/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-regex-literals'; diff --git a/packages/jsts/src/rules/S6326/generated-meta.ts b/packages/jsts/src/rules/S6326/generated-meta.ts new file mode 100644 index 00000000000..5a71875a942 --- /dev/null +++ b/packages/jsts/src/rules/S6326/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: 'Regular expressions should not contain multiple spaces', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6326/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6326'; diff --git a/packages/jsts/src/rules/S6326/meta.ts b/packages/jsts/src/rules/S6326/meta.ts index 5a71875a942..e1c7205dc3f 100644 --- a/packages/jsts/src/rules/S6326/meta.ts +++ b/packages/jsts/src/rules/S6326/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: 'Regular expressions should not contain multiple spaces', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6326/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6326'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-regex-spaces'; diff --git a/packages/jsts/src/rules/S6327/generated-meta.ts b/packages/jsts/src/rules/S6327/generated-meta.ts new file mode 100644 index 00000000000..35174cbced3 --- /dev/null +++ b/packages/jsts/src/rules/S6327/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 unencrypted SNS topics is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6327/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6327'; diff --git a/packages/jsts/src/rules/S6327/meta.ts b/packages/jsts/src/rules/S6327/meta.ts index 35174cbced3..97fa8770b86 100644 --- a/packages/jsts/src/rules/S6327/meta.ts +++ b/packages/jsts/src/rules/S6327/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 unencrypted SNS topics is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6327/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6327'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-sns-unencrypted-topics'; diff --git a/packages/jsts/src/rules/S6328/generated-meta.ts b/packages/jsts/src/rules/S6328/generated-meta.ts new file mode 100644 index 00000000000..64424968cae --- /dev/null +++ b/packages/jsts/src/rules/S6328/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: 'Replacement strings should reference existing regular expression groups', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6328/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6328'; diff --git a/packages/jsts/src/rules/S6328/meta.ts b/packages/jsts/src/rules/S6328/meta.ts index 64424968cae..883226fef33 100644 --- a/packages/jsts/src/rules/S6328/meta.ts +++ b/packages/jsts/src/rules/S6328/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: 'Replacement strings should reference existing regular expression groups', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6328/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6328'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'existing-groups'; diff --git a/packages/jsts/src/rules/S6329/generated-meta.ts b/packages/jsts/src/rules/S6329/generated-meta.ts new file mode 100644 index 00000000000..effc363e43f --- /dev/null +++ b/packages/jsts/src/rules/S6329/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: 'Allowing public network access to cloud resources is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6329/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6329'; diff --git a/packages/jsts/src/rules/S6329/meta.ts b/packages/jsts/src/rules/S6329/meta.ts index effc363e43f..783053f8e2d 100644 --- a/packages/jsts/src/rules/S6329/meta.ts +++ b/packages/jsts/src/rules/S6329/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: 'Allowing public network access to cloud resources is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6329/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6329'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-ec2-rds-dms-public'; diff --git a/packages/jsts/src/rules/S6330/generated-meta.ts b/packages/jsts/src/rules/S6330/generated-meta.ts new file mode 100644 index 00000000000..f17bf29eda2 --- /dev/null +++ b/packages/jsts/src/rules/S6330/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 unencrypted SQS queues is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6330/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6330'; diff --git a/packages/jsts/src/rules/S6330/meta.ts b/packages/jsts/src/rules/S6330/meta.ts index f17bf29eda2..56db2b82e76 100644 --- a/packages/jsts/src/rules/S6330/meta.ts +++ b/packages/jsts/src/rules/S6330/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 unencrypted SQS queues is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6330/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6330'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-sqs-unencrypted-queue'; diff --git a/packages/jsts/src/rules/S6331/generated-meta.ts b/packages/jsts/src/rules/S6331/generated-meta.ts new file mode 100644 index 00000000000..ce1977ba617 --- /dev/null +++ b/packages/jsts/src/rules/S6331/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: 'Regular expressions should not contain empty groups', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6331/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6331'; diff --git a/packages/jsts/src/rules/S6331/meta.ts b/packages/jsts/src/rules/S6331/meta.ts index ce1977ba617..34c24d7d01b 100644 --- a/packages/jsts/src/rules/S6331/meta.ts +++ b/packages/jsts/src/rules/S6331/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: 'Regular expressions should not contain empty groups', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6331/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6331'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-empty-group'; diff --git a/packages/jsts/src/rules/S6332/generated-meta.ts b/packages/jsts/src/rules/S6332/generated-meta.ts new file mode 100644 index 00000000000..fde4386d7ee --- /dev/null +++ b/packages/jsts/src/rules/S6332/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 unencrypted EFS file systems is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6332/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6332'; diff --git a/packages/jsts/src/rules/S6332/meta.ts b/packages/jsts/src/rules/S6332/meta.ts index fde4386d7ee..91c7fe0931c 100644 --- a/packages/jsts/src/rules/S6332/meta.ts +++ b/packages/jsts/src/rules/S6332/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 unencrypted EFS file systems is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6332/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6332'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-efs-unencrypted'; diff --git a/packages/jsts/src/rules/S6333/generated-meta.ts b/packages/jsts/src/rules/S6333/generated-meta.ts new file mode 100644 index 00000000000..70c2b82f292 --- /dev/null +++ b/packages/jsts/src/rules/S6333/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 public APIs is security-sensitive', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6333/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6333'; diff --git a/packages/jsts/src/rules/S6333/meta.ts b/packages/jsts/src/rules/S6333/meta.ts index 70c2b82f292..716aca7d1d4 100644 --- a/packages/jsts/src/rules/S6333/meta.ts +++ b/packages/jsts/src/rules/S6333/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 public APIs is security-sensitive', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6333/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6333'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'aws-apigateway-public-api'; diff --git a/packages/jsts/src/rules/S6351/generated-meta.ts b/packages/jsts/src/rules/S6351/generated-meta.ts new file mode 100644 index 00000000000..34fe50a9019 --- /dev/null +++ b/packages/jsts/src/rules/S6351/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: 'Regular expressions with the global flag should be used with caution', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6351/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6351'; diff --git a/packages/jsts/src/rules/S6351/meta.ts b/packages/jsts/src/rules/S6351/meta.ts index 34fe50a9019..b898cb4cf87 100644 --- a/packages/jsts/src/rules/S6351/meta.ts +++ b/packages/jsts/src/rules/S6351/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: 'Regular expressions with the global flag should be used with caution', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6351/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6351'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'stateful-regex'; diff --git a/packages/jsts/src/rules/S6353/generated-meta.ts b/packages/jsts/src/rules/S6353/generated-meta.ts new file mode 100644 index 00000000000..001f505de31 --- /dev/null +++ b/packages/jsts/src/rules/S6353/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: 'Regular expression quantifiers and character classes should be used concisely', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6353/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6353'; diff --git a/packages/jsts/src/rules/S6353/meta.ts b/packages/jsts/src/rules/S6353/meta.ts index 001f505de31..386b5e0be9d 100644 --- a/packages/jsts/src/rules/S6353/meta.ts +++ b/packages/jsts/src/rules/S6353/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: 'Regular expression quantifiers and character classes should be used concisely', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6353/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6353'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'concise-regex'; diff --git a/packages/jsts/src/rules/S6397/generated-meta.ts b/packages/jsts/src/rules/S6397/generated-meta.ts new file mode 100644 index 00000000000..c139fb7acf2 --- /dev/null +++ b/packages/jsts/src/rules/S6397/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: 'Character classes in regular expressions should not contain only one character', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6397/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6397'; diff --git a/packages/jsts/src/rules/S6397/meta.ts b/packages/jsts/src/rules/S6397/meta.ts index c139fb7acf2..43ee6b6ef77 100644 --- a/packages/jsts/src/rules/S6397/meta.ts +++ b/packages/jsts/src/rules/S6397/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: 'Character classes in regular expressions should not contain only one character', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6397/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6397'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'single-char-in-character-classes'; diff --git a/packages/jsts/src/rules/S6426/generated-meta.ts b/packages/jsts/src/rules/S6426/generated-meta.ts new file mode 100644 index 00000000000..a09f1b712b9 --- /dev/null +++ b/packages/jsts/src/rules/S6426/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: 'Exclusive tests should not be commited to version control', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6426/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6426'; diff --git a/packages/jsts/src/rules/S6426/meta.ts b/packages/jsts/src/rules/S6426/meta.ts index a09f1b712b9..1f836b1ed0d 100644 --- a/packages/jsts/src/rules/S6426/meta.ts +++ b/packages/jsts/src/rules/S6426/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: 'Exclusive tests should not be commited to version control', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6426/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6426'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-exclusive-tests'; diff --git a/packages/jsts/src/rules/S6435/generated-meta.ts b/packages/jsts/src/rules/S6435/generated-meta.ts new file mode 100644 index 00000000000..f95af72bacb --- /dev/null +++ b/packages/jsts/src/rules/S6435/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: 'React "render" functions should return a value', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6435/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6435'; diff --git a/packages/jsts/src/rules/S6435/index.ts b/packages/jsts/src/rules/S6435/index.ts new file mode 100644 index 00000000000..0835f3aa1ec --- /dev/null +++ b/packages/jsts/src/rules/S6435/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-react'; +export const rule = rules['require-render-return']; diff --git a/packages/jsts/src/rules/S6435/meta.ts b/packages/jsts/src/rules/S6435/meta.ts new file mode 100644 index 00000000000..640871ef106 --- /dev/null +++ b/packages/jsts/src/rules/S6435/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 = 'require-render-return'; diff --git a/packages/jsts/src/rules/S6438/generated-meta.ts b/packages/jsts/src/rules/S6438/generated-meta.ts new file mode 100644 index 00000000000..fe168e8b3c3 --- /dev/null +++ b/packages/jsts/src/rules/S6438/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: 'Comments inside JSX expressions should be enclosed in curly braces', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6438/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6438'; diff --git a/packages/jsts/src/rules/S6438/index.ts b/packages/jsts/src/rules/S6438/index.ts new file mode 100644 index 00000000000..f3921d6d204 --- /dev/null +++ b/packages/jsts/src/rules/S6438/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-react'; +export const rule = rules['jsx-no-comment-textnodes']; diff --git a/packages/jsts/src/rules/S6438/meta.ts b/packages/jsts/src/rules/S6438/meta.ts new file mode 100644 index 00000000000..f7a6630a9f6 --- /dev/null +++ b/packages/jsts/src/rules/S6438/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 = 'jsx-no-comment-textnodes'; diff --git a/packages/jsts/src/rules/S6439/generated-meta.ts b/packages/jsts/src/rules/S6439/generated-meta.ts new file mode 100644 index 00000000000..8527b3bf1f5 --- /dev/null +++ b/packages/jsts/src/rules/S6439/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: 'React components should not render non-boolean condition values', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6439/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6439'; diff --git a/packages/jsts/src/rules/S6439/meta.ts b/packages/jsts/src/rules/S6439/meta.ts index 8527b3bf1f5..cef370d87bf 100644 --- a/packages/jsts/src/rules/S6439/meta.ts +++ b/packages/jsts/src/rules/S6439/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: 'React components should not render non-boolean condition values', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6439/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6439'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'jsx-no-leaked-render'; diff --git a/packages/jsts/src/rules/S6440/generated-meta.ts b/packages/jsts/src/rules/S6440/generated-meta.ts new file mode 100644 index 00000000000..53c02db4e8d --- /dev/null +++ b/packages/jsts/src/rules/S6440/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: 'React Hooks should be properly called', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6440/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6440'; diff --git a/packages/jsts/src/rules/S6440/meta.ts b/packages/jsts/src/rules/S6440/meta.ts index 53c02db4e8d..73d644aa7b9 100644 --- a/packages/jsts/src/rules/S6440/meta.ts +++ b/packages/jsts/src/rules/S6440/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: 'React Hooks should be properly called', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6440/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6440'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'rules-of-hooks'; diff --git a/packages/jsts/src/rules/S6441/generated-meta.ts b/packages/jsts/src/rules/S6441/generated-meta.ts new file mode 100644 index 00000000000..ae35f5c6984 --- /dev/null +++ b/packages/jsts/src/rules/S6441/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 methods of React components should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6441/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6441'; diff --git a/packages/jsts/src/rules/S6441/meta.ts b/packages/jsts/src/rules/S6441/meta.ts index ae35f5c6984..92c3eb2ee5d 100644 --- a/packages/jsts/src/rules/S6441/meta.ts +++ b/packages/jsts/src/rules/S6441/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 methods of React components should be removed', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6441/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6441'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-unused-class-component-methods'; diff --git a/packages/jsts/src/rules/S6442/generated-meta.ts b/packages/jsts/src/rules/S6442/generated-meta.ts new file mode 100644 index 00000000000..739a9a32165 --- /dev/null +++ b/packages/jsts/src/rules/S6442/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: + "React's useState hook should not be used directly in the render function or body of a component", + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6442/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6442'; diff --git a/packages/jsts/src/rules/S6442/meta.ts b/packages/jsts/src/rules/S6442/meta.ts index 739a9a32165..d61dc3b1c87 100644 --- a/packages/jsts/src/rules/S6442/meta.ts +++ b/packages/jsts/src/rules/S6442/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: - "React's useState hook should not be used directly in the render function or body of a component", - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6442/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6442'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-hook-setter-in-body'; diff --git a/packages/jsts/src/rules/S6443/generated-meta.ts b/packages/jsts/src/rules/S6443/generated-meta.ts new file mode 100644 index 00000000000..07b14bfc273 --- /dev/null +++ b/packages/jsts/src/rules/S6443/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: + 'React state setter function should not be called with its matching state variable', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6443/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6443'; diff --git a/packages/jsts/src/rules/S6443/meta.ts b/packages/jsts/src/rules/S6443/meta.ts index 07b14bfc273..5ebabdc4a6d 100644 --- a/packages/jsts/src/rules/S6443/meta.ts +++ b/packages/jsts/src/rules/S6443/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: - 'React state setter function should not be called with its matching state variable', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6443/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6443'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-useless-react-setstate'; diff --git a/packages/jsts/src/rules/S6477/generated-meta.ts b/packages/jsts/src/rules/S6477/generated-meta.ts new file mode 100644 index 00000000000..046aca7784f --- /dev/null +++ b/packages/jsts/src/rules/S6477/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: 'JSX list components should have a key property', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6477/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6477'; diff --git a/packages/jsts/src/rules/S6477/meta.ts b/packages/jsts/src/rules/S6477/meta.ts index 046aca7784f..99b5ba3e8e0 100644 --- a/packages/jsts/src/rules/S6477/meta.ts +++ b/packages/jsts/src/rules/S6477/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: 'JSX list components should have a key property', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6477/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6477'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'jsx-key'; diff --git a/packages/jsts/src/rules/S6478/generated-meta.ts b/packages/jsts/src/rules/S6478/generated-meta.ts new file mode 100644 index 00000000000..d997efe09ed --- /dev/null +++ b/packages/jsts/src/rules/S6478/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: 'React components should not be nested', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6478/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6478'; diff --git a/packages/jsts/src/rules/S6478/meta.ts b/packages/jsts/src/rules/S6478/meta.ts index d997efe09ed..a5fa520120c 100644 --- a/packages/jsts/src/rules/S6478/meta.ts +++ b/packages/jsts/src/rules/S6478/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: 'React components should not be nested', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6478/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6478'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-unstable-nested-components'; diff --git a/packages/jsts/src/rules/S6479/generated-meta.ts b/packages/jsts/src/rules/S6479/generated-meta.ts new file mode 100644 index 00000000000..486304abe83 --- /dev/null +++ b/packages/jsts/src/rules/S6479/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: 'JSX list components should not use array indexes as key', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6479/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6479'; diff --git a/packages/jsts/src/rules/S6479/meta.ts b/packages/jsts/src/rules/S6479/meta.ts index 486304abe83..32d3d1d034d 100644 --- a/packages/jsts/src/rules/S6479/meta.ts +++ b/packages/jsts/src/rules/S6479/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: 'JSX list components should not use array indexes as key', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6479/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6479'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-array-index-key'; diff --git a/packages/jsts/src/rules/S6480/generated-meta.ts b/packages/jsts/src/rules/S6480/generated-meta.ts new file mode 100644 index 00000000000..85c5aad475d --- /dev/null +++ b/packages/jsts/src/rules/S6480/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: 'Disallow `.bind()` and arrow functions in JSX props', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6480/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6480'; diff --git a/packages/jsts/src/rules/S6480/index.ts b/packages/jsts/src/rules/S6480/index.ts new file mode 100644 index 00000000000..66e1e0b9507 --- /dev/null +++ b/packages/jsts/src/rules/S6480/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-react'; +export const rule = rules['jsx-no-bind']; diff --git a/packages/jsts/src/rules/S6480/meta.ts b/packages/jsts/src/rules/S6480/meta.ts new file mode 100644 index 00000000000..82a43326386 --- /dev/null +++ b/packages/jsts/src/rules/S6480/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 = 'jsx-no-bind'; diff --git a/packages/jsts/src/rules/S6481/generated-meta.ts b/packages/jsts/src/rules/S6481/generated-meta.ts new file mode 100644 index 00000000000..c1293fc4ada --- /dev/null +++ b/packages/jsts/src/rules/S6481/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: 'React Context Provider values should have stable identities', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6481/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6481'; diff --git a/packages/jsts/src/rules/S6481/meta.ts b/packages/jsts/src/rules/S6481/meta.ts index c1293fc4ada..e512295920d 100644 --- a/packages/jsts/src/rules/S6481/meta.ts +++ b/packages/jsts/src/rules/S6481/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: 'React Context Provider values should have stable identities', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6481/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6481'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'jsx-no-constructed-context-values'; diff --git a/packages/jsts/src/rules/S6486/generated-meta.ts b/packages/jsts/src/rules/S6486/generated-meta.ts new file mode 100644 index 00000000000..7bd1fd56b6e --- /dev/null +++ b/packages/jsts/src/rules/S6486/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: 'JSX list components keys should match up between renders', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6486/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6486'; diff --git a/packages/jsts/src/rules/S6486/meta.ts b/packages/jsts/src/rules/S6486/meta.ts index 7bd1fd56b6e..692463ef513 100644 --- a/packages/jsts/src/rules/S6486/meta.ts +++ b/packages/jsts/src/rules/S6486/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: 'JSX list components keys should match up between renders', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6486/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6486'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-uniq-key'; diff --git a/packages/jsts/src/rules/S6509/generated-meta.ts b/packages/jsts/src/rules/S6509/generated-meta.ts new file mode 100644 index 00000000000..26ea2fbdcde --- /dev/null +++ b/packages/jsts/src/rules/S6509/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: 'Extra boolean casts should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6509/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6509'; diff --git a/packages/jsts/src/rules/S6509/index.ts b/packages/jsts/src/rules/S6509/index.ts new file mode 100644 index 00000000000..4bd849134b9 --- /dev/null +++ b/packages/jsts/src/rules/S6509/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-extra-boolean-cast'); diff --git a/packages/jsts/src/rules/S6509/meta.ts b/packages/jsts/src/rules/S6509/meta.ts new file mode 100644 index 00000000000..b421d637073 --- /dev/null +++ b/packages/jsts/src/rules/S6509/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-extra-boolean-cast'; diff --git a/packages/jsts/src/rules/S6522/generated-meta.ts b/packages/jsts/src/rules/S6522/generated-meta.ts new file mode 100644 index 00000000000..2b70b10d9cb --- /dev/null +++ b/packages/jsts/src/rules/S6522/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 variables should not be reassigned', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6522/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6522'; diff --git a/packages/jsts/src/rules/S6522/index.ts b/packages/jsts/src/rules/S6522/index.ts new file mode 100644 index 00000000000..f10754a7acd --- /dev/null +++ b/packages/jsts/src/rules/S6522/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-import-assign'); diff --git a/packages/jsts/src/rules/S6522/meta.ts b/packages/jsts/src/rules/S6522/meta.ts new file mode 100644 index 00000000000..5cf2f2a420c --- /dev/null +++ b/packages/jsts/src/rules/S6522/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-import-assign'; diff --git a/packages/jsts/src/rules/S6523/generated-meta.ts b/packages/jsts/src/rules/S6523/generated-meta.ts new file mode 100644 index 00000000000..985c8ab7585 --- /dev/null +++ b/packages/jsts/src/rules/S6523/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: 'Optional chaining should not be used if returning "undefined" throws an error', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6523/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6523'; diff --git a/packages/jsts/src/rules/S6523/index.ts b/packages/jsts/src/rules/S6523/index.ts new file mode 100644 index 00000000000..121dd41b3fd --- /dev/null +++ b/packages/jsts/src/rules/S6523/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-optional-chaining'); diff --git a/packages/jsts/src/rules/S6523/meta.ts b/packages/jsts/src/rules/S6523/meta.ts new file mode 100644 index 00000000000..37dd75a2fae --- /dev/null +++ b/packages/jsts/src/rules/S6523/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-optional-chaining'; diff --git a/packages/jsts/src/rules/S6534/generated-meta.ts b/packages/jsts/src/rules/S6534/generated-meta.ts new file mode 100644 index 00000000000..00723791d95 --- /dev/null +++ b/packages/jsts/src/rules/S6534/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: 'Numbers should not lose precision', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6534/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6534'; diff --git a/packages/jsts/src/rules/S6534/index.ts b/packages/jsts/src/rules/S6534/index.ts new file mode 100644 index 00000000000..6ef4cd9754e --- /dev/null +++ b/packages/jsts/src/rules/S6534/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-loss-of-precision'); diff --git a/packages/jsts/src/rules/S6534/meta.ts b/packages/jsts/src/rules/S6534/meta.ts new file mode 100644 index 00000000000..b997c6358bd --- /dev/null +++ b/packages/jsts/src/rules/S6534/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-loss-of-precision'; diff --git a/packages/jsts/src/rules/S6535/generated-meta.ts b/packages/jsts/src/rules/S6535/generated-meta.ts new file mode 100644 index 00000000000..3107b9d560a --- /dev/null +++ b/packages/jsts/src/rules/S6535/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 character escapes should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6535/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6535'; diff --git a/packages/jsts/src/rules/S6535/meta.ts b/packages/jsts/src/rules/S6535/meta.ts index 3107b9d560a..fabf6cfc828 100644 --- a/packages/jsts/src/rules/S6535/meta.ts +++ b/packages/jsts/src/rules/S6535/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 character escapes should be removed', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6535/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6535'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'unnecessary-character-escapes'; diff --git a/packages/jsts/src/rules/S6535/rule.ts b/packages/jsts/src/rules/S6535/rule.ts index b50fc19ab72..a5d8cf5e69f 100644 --- a/packages/jsts/src/rules/S6535/rule.ts +++ b/packages/jsts/src/rules/S6535/rule.ts @@ -20,7 +20,7 @@ // https://sonarsource.github.io/rspec/#/rspec/S6535/javascript import type { Rule } from 'eslint'; -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { generateMeta, interceptReport, mergeRules } from '../helpers/index.js'; import { meta } from './meta.js'; @@ -32,8 +32,8 @@ import { meta } from './meta.js'; * * Here we arbitrarily choose to decorate 'no-nonoctal-decimal-escape'. */ -const noUselessEscapeRule = eslintRules['no-useless-escape']; -const noNonoctalDecimalEscapeRule = eslintRules['no-nonoctal-decimal-escape']; +const noUselessEscapeRule = getESLintCoreRule('no-useless-escape'); +const noNonoctalDecimalEscapeRule = getESLintCoreRule('no-nonoctal-decimal-escape'); /** * We decorate 'no-nonoctal-decimal-escape' to map suggestions with the message id 'escapeBackslash' to 'nonOctalEscapeBacklash'. diff --git a/packages/jsts/src/rules/S6544/generated-meta.ts b/packages/jsts/src/rules/S6544/generated-meta.ts new file mode 100644 index 00000000000..9b83b00d164 --- /dev/null +++ b/packages/jsts/src/rules/S6544/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: 'Promises should not be misused', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6544/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6544'; diff --git a/packages/jsts/src/rules/S6544/meta.ts b/packages/jsts/src/rules/S6544/meta.ts index 9b83b00d164..85ac4109fe7 100644 --- a/packages/jsts/src/rules/S6544/meta.ts +++ b/packages/jsts/src/rules/S6544/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: 'Promises should not be misused', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6544/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6544'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-misused-promises'; diff --git a/packages/jsts/src/rules/S6544/rule.ts b/packages/jsts/src/rules/S6544/rule.ts index 68b569c1ad3..54ca7cfe7a1 100644 --- a/packages/jsts/src/rules/S6544/rule.ts +++ b/packages/jsts/src/rules/S6544/rule.ts @@ -20,8 +20,8 @@ // https://sonarsource.github.io/rspec/#/rspec/S6544/javascript import type { Rule } from 'eslint'; -import { tsEslintRules } from '../typescript-eslint/index.js'; -import { eslintRules } from '../core/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { FUNCTION_NODES, generateMeta, @@ -68,7 +68,7 @@ const decoratedNoMisusedPromisesRule = interceptReport( }, ); -const noAsyncPromiseExecutorRule = eslintRules['no-async-promise-executor']; +const noAsyncPromiseExecutorRule = getESLintCoreRule('no-async-promise-executor'); const decoratedNoAsyncPromiseExecutorRule = interceptReport( noAsyncPromiseExecutorRule, (context, descriptor) => { diff --git a/packages/jsts/src/rules/S6550/generated-meta.ts b/packages/jsts/src/rules/S6550/generated-meta.ts new file mode 100644 index 00000000000..da57bfb0d0e --- /dev/null +++ b/packages/jsts/src/rules/S6550/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: 'All enum members should be literals', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6550/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6550'; diff --git a/packages/jsts/src/rules/S6550/index.ts b/packages/jsts/src/rules/S6550/index.ts new file mode 100644 index 00000000000..5bd16218c6c --- /dev/null +++ b/packages/jsts/src/rules/S6550/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-literal-enum-member']; diff --git a/packages/jsts/src/rules/S6550/meta.ts b/packages/jsts/src/rules/S6550/meta.ts new file mode 100644 index 00000000000..6f987eaaef0 --- /dev/null +++ b/packages/jsts/src/rules/S6550/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-literal-enum-member'; diff --git a/packages/jsts/src/rules/S6551/generated-meta.ts b/packages/jsts/src/rules/S6551/generated-meta.ts new file mode 100644 index 00000000000..c0249b86ef5 --- /dev/null +++ b/packages/jsts/src/rules/S6551/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: + 'Objects and classes converted or coerced to strings should define a "toString()" method', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6551/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6551'; diff --git a/packages/jsts/src/rules/S6551/index.ts b/packages/jsts/src/rules/S6551/index.ts index ebfa3040fd5..1298a364b2a 100644 --- a/packages/jsts/src/rules/S6551/index.ts +++ b/packages/jsts/src/rules/S6551/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-base-to-string']); diff --git a/packages/jsts/src/rules/S6551/meta.ts b/packages/jsts/src/rules/S6551/meta.ts index c0249b86ef5..e640eae8d27 100644 --- a/packages/jsts/src/rules/S6551/meta.ts +++ b/packages/jsts/src/rules/S6551/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: - 'Objects and classes converted or coerced to strings should define a "toString()" method', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6551/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6551'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-base-to-string'; diff --git a/packages/jsts/src/rules/S6557/generated-meta.ts b/packages/jsts/src/rules/S6557/generated-meta.ts new file mode 100644 index 00000000000..aaaeddc7e6d --- /dev/null +++ b/packages/jsts/src/rules/S6557/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: 'Ends of strings should be checked with "startsWith()" and "endsWith()"', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6557/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6557'; diff --git a/packages/jsts/src/rules/S6557/index.ts b/packages/jsts/src/rules/S6557/index.ts index c025b5ec214..db3d2f3afb0 100644 --- a/packages/jsts/src/rules/S6557/index.ts +++ b/packages/jsts/src/rules/S6557/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-string-starts-ends-with']); diff --git a/packages/jsts/src/rules/S6557/meta.ts b/packages/jsts/src/rules/S6557/meta.ts index aaaeddc7e6d..245e475ee55 100644 --- a/packages/jsts/src/rules/S6557/meta.ts +++ b/packages/jsts/src/rules/S6557/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: 'Ends of strings should be checked with "startsWith()" and "endsWith()"', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6557/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6557'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'prefer-string-starts-ends-with'; diff --git a/packages/jsts/src/rules/S6564/generated-meta.ts b/packages/jsts/src/rules/S6564/generated-meta.ts new file mode 100644 index 00000000000..b8f08dec50d --- /dev/null +++ b/packages/jsts/src/rules/S6564/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: 'Redundant type aliases should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6564/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6564'; diff --git a/packages/jsts/src/rules/S6564/meta.ts b/packages/jsts/src/rules/S6564/meta.ts index b8f08dec50d..f4c001eb5cf 100644 --- a/packages/jsts/src/rules/S6564/meta.ts +++ b/packages/jsts/src/rules/S6564/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: 'Redundant type aliases should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6564/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6564'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'redundant-type-aliases'; diff --git a/packages/jsts/src/rules/S6565/generated-meta.ts b/packages/jsts/src/rules/S6565/generated-meta.ts new file mode 100644 index 00000000000..de4b0f615a0 --- /dev/null +++ b/packages/jsts/src/rules/S6565/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: 'Prefer the return type "this" in fluent interfaces', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6565/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6565'; diff --git a/packages/jsts/src/rules/S6565/index.ts b/packages/jsts/src/rules/S6565/index.ts new file mode 100644 index 00000000000..4c0ceb5711a --- /dev/null +++ b/packages/jsts/src/rules/S6565/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-return-this-type']; diff --git a/packages/jsts/src/rules/S6565/meta.ts b/packages/jsts/src/rules/S6565/meta.ts new file mode 100644 index 00000000000..53f81d2c773 --- /dev/null +++ b/packages/jsts/src/rules/S6565/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-return-this-type'; diff --git a/packages/jsts/src/rules/S6568/generated-meta.ts b/packages/jsts/src/rules/S6568/generated-meta.ts new file mode 100644 index 00000000000..b937f35f362 --- /dev/null +++ b/packages/jsts/src/rules/S6568/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 misleadingly', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6568/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6568'; diff --git a/packages/jsts/src/rules/S6568/index.ts b/packages/jsts/src/rules/S6568/index.ts new file mode 100644 index 00000000000..29465dc0524 --- /dev/null +++ b/packages/jsts/src/rules/S6568/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-confusing-non-null-assertion']; diff --git a/packages/jsts/src/rules/S6568/meta.ts b/packages/jsts/src/rules/S6568/meta.ts new file mode 100644 index 00000000000..e5e8bf8e846 --- /dev/null +++ b/packages/jsts/src/rules/S6568/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-confusing-non-null-assertion'; diff --git a/packages/jsts/src/rules/S6569/generated-meta.ts b/packages/jsts/src/rules/S6569/generated-meta.ts new file mode 100644 index 00000000000..4a0f23b6353 --- /dev/null +++ b/packages/jsts/src/rules/S6569/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 type constraints should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6569/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6569'; diff --git a/packages/jsts/src/rules/S6569/index.ts b/packages/jsts/src/rules/S6569/index.ts new file mode 100644 index 00000000000..bef93803e88 --- /dev/null +++ b/packages/jsts/src/rules/S6569/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-constraint']; diff --git a/packages/jsts/src/rules/S6569/meta.ts b/packages/jsts/src/rules/S6569/meta.ts new file mode 100644 index 00000000000..26d71bd309b --- /dev/null +++ b/packages/jsts/src/rules/S6569/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-constraint'; diff --git a/packages/jsts/src/rules/S6571/generated-meta.ts b/packages/jsts/src/rules/S6571/generated-meta.ts new file mode 100644 index 00000000000..4c2062414ab --- /dev/null +++ b/packages/jsts/src/rules/S6571/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 constituents of unions and intersections should not be redundant', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6571/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6571'; diff --git a/packages/jsts/src/rules/S6571/index.ts b/packages/jsts/src/rules/S6571/index.ts index 594e7aeb0be..979aee51749 100644 --- a/packages/jsts/src/rules/S6571/index.ts +++ b/packages/jsts/src/rules/S6571/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-redundant-type-constituents']); diff --git a/packages/jsts/src/rules/S6571/meta.ts b/packages/jsts/src/rules/S6571/meta.ts index 4c2062414ab..334fa2c27e1 100644 --- a/packages/jsts/src/rules/S6571/meta.ts +++ b/packages/jsts/src/rules/S6571/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 constituents of unions and intersections should not be redundant', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6571/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6571'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-redundant-type-constituents'; diff --git a/packages/jsts/src/rules/S6572/generated-meta.ts b/packages/jsts/src/rules/S6572/generated-meta.ts new file mode 100644 index 00000000000..e33d2214899 --- /dev/null +++ b/packages/jsts/src/rules/S6572/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: 'Enum member values should be either all initialized or none', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6572/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6572'; diff --git a/packages/jsts/src/rules/S6572/meta.ts b/packages/jsts/src/rules/S6572/meta.ts index e33d2214899..8d1aa1bad65 100644 --- a/packages/jsts/src/rules/S6572/meta.ts +++ b/packages/jsts/src/rules/S6572/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: 'Enum member values should be either all initialized or none', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6572/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6572'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'prefer-enum-initializers'; diff --git a/packages/jsts/src/rules/S6572/rule.ts b/packages/jsts/src/rules/S6572/rule.ts index 8e8cfdbbea6..4da703bbea1 100644 --- a/packages/jsts/src/rules/S6572/rule.ts +++ b/packages/jsts/src/rules/S6572/rule.ts @@ -24,7 +24,7 @@ import type { Rule } from 'eslint'; import { TSESTree } from '@typescript-eslint/utils'; import { generateMeta, isNumberLiteral } from '../helpers/index.js'; import { meta } from './meta.js'; -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; const baseRuleModule = tsEslintRules['prefer-enum-initializers']; // The core implementation of this rule reports all enums for which there is a member value that is diff --git a/packages/jsts/src/rules/S6578/generated-meta.ts b/packages/jsts/src/rules/S6578/generated-meta.ts new file mode 100644 index 00000000000..6e1d9205dca --- /dev/null +++ b/packages/jsts/src/rules/S6578/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: 'Enum values should be unique', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6578/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6578'; diff --git a/packages/jsts/src/rules/S6578/index.ts b/packages/jsts/src/rules/S6578/index.ts new file mode 100644 index 00000000000..878c691b03e --- /dev/null +++ b/packages/jsts/src/rules/S6578/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-duplicate-enum-values']; diff --git a/packages/jsts/src/rules/S6578/meta.ts b/packages/jsts/src/rules/S6578/meta.ts new file mode 100644 index 00000000000..113346229d0 --- /dev/null +++ b/packages/jsts/src/rules/S6578/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-duplicate-enum-values'; diff --git a/packages/jsts/src/rules/S6582/generated-meta.ts b/packages/jsts/src/rules/S6582/generated-meta.ts new file mode 100644 index 00000000000..2b5d4db0bd5 --- /dev/null +++ b/packages/jsts/src/rules/S6582/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 chaining should be preferred', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6582/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6582'; diff --git a/packages/jsts/src/rules/S6582/meta.ts b/packages/jsts/src/rules/S6582/meta.ts index 2b5d4db0bd5..694ed79d2e7 100644 --- a/packages/jsts/src/rules/S6582/meta.ts +++ b/packages/jsts/src/rules/S6582/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 chaining should be preferred', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6582/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6582'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'prefer-optional-chain'; diff --git a/packages/jsts/src/rules/S6582/rule.ts b/packages/jsts/src/rules/S6582/rule.ts index c9bcc4d149e..aeb75691945 100644 --- a/packages/jsts/src/rules/S6582/rule.ts +++ b/packages/jsts/src/rules/S6582/rule.ts @@ -20,7 +20,7 @@ // https://sonarsource.github.io/rspec/#/rspec/S6582/javascript import type { Rule } from 'eslint'; -import { tsEslintRules } from '../typescript-eslint/index.js'; +import { rules as tsEslintRules } from '../typescript-eslint/index.js'; import { generateMeta } from '../helpers/index.js'; import { meta } from './meta.js'; diff --git a/packages/jsts/src/rules/S6583/generated-meta.ts b/packages/jsts/src/rules/S6583/generated-meta.ts new file mode 100644 index 00000000000..2d2f91c1044 --- /dev/null +++ b/packages/jsts/src/rules/S6583/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: 'Enum members should not mix value types', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6583/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6583'; diff --git a/packages/jsts/src/rules/S6583/index.ts b/packages/jsts/src/rules/S6583/index.ts new file mode 100644 index 00000000000..585e1a9884a --- /dev/null +++ b/packages/jsts/src/rules/S6583/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-mixed-enums']; diff --git a/packages/jsts/src/rules/S6583/meta.ts b/packages/jsts/src/rules/S6583/meta.ts new file mode 100644 index 00000000000..c05ff7a61ff --- /dev/null +++ b/packages/jsts/src/rules/S6583/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-mixed-enums'; diff --git a/packages/jsts/src/rules/S6590/generated-meta.ts b/packages/jsts/src/rules/S6590/generated-meta.ts new file mode 100644 index 00000000000..9712c02f744 --- /dev/null +++ b/packages/jsts/src/rules/S6590/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: '"as const" assertions should be preferred', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6590/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6590'; diff --git a/packages/jsts/src/rules/S6590/index.ts b/packages/jsts/src/rules/S6590/index.ts new file mode 100644 index 00000000000..af9d67135e1 --- /dev/null +++ b/packages/jsts/src/rules/S6590/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-as-const']; diff --git a/packages/jsts/src/rules/S6590/meta.ts b/packages/jsts/src/rules/S6590/meta.ts new file mode 100644 index 00000000000..a6c8b3bc769 --- /dev/null +++ b/packages/jsts/src/rules/S6590/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-as-const'; diff --git a/packages/jsts/src/rules/S6594/generated-meta.ts b/packages/jsts/src/rules/S6594/generated-meta.ts new file mode 100644 index 00000000000..f3ae1a32581 --- /dev/null +++ b/packages/jsts/src/rules/S6594/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: '"RegExp.exec()" should be preferred over "String.match()"', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6594/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6594'; diff --git a/packages/jsts/src/rules/S6594/meta.ts b/packages/jsts/src/rules/S6594/meta.ts index f3ae1a32581..10aafbce30f 100644 --- a/packages/jsts/src/rules/S6594/meta.ts +++ b/packages/jsts/src/rules/S6594/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: '"RegExp.exec()" should be preferred over "String.match()"', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6594/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6594'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'prefer-regexp-exec'; diff --git a/packages/jsts/src/rules/S6598/generated-meta.ts b/packages/jsts/src/rules/S6598/generated-meta.ts new file mode 100644 index 00000000000..fee2b13222f --- /dev/null +++ b/packages/jsts/src/rules/S6598/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 types should be preferred', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6598/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6598'; diff --git a/packages/jsts/src/rules/S6598/index.ts b/packages/jsts/src/rules/S6598/index.ts index a101fde6b4b..f058869e085 100644 --- a/packages/jsts/src/rules/S6598/index.ts +++ b/packages/jsts/src/rules/S6598/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-function-type']); diff --git a/packages/jsts/src/rules/S6598/meta.ts b/packages/jsts/src/rules/S6598/meta.ts index fee2b13222f..0fe8a6732e9 100644 --- a/packages/jsts/src/rules/S6598/meta.ts +++ b/packages/jsts/src/rules/S6598/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: 'Function types should be preferred', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6598/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6598'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'prefer-function-type'; diff --git a/packages/jsts/src/rules/S6606/generated-meta.ts b/packages/jsts/src/rules/S6606/generated-meta.ts new file mode 100644 index 00000000000..1db3f857fc9 --- /dev/null +++ b/packages/jsts/src/rules/S6606/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: 'Nullish coalescing should be preferred', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6606/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6606'; diff --git a/packages/jsts/src/rules/S6606/meta.ts b/packages/jsts/src/rules/S6606/meta.ts index 1db3f857fc9..19dfa77a4a0 100644 --- a/packages/jsts/src/rules/S6606/meta.ts +++ b/packages/jsts/src/rules/S6606/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: 'Nullish coalescing should be preferred', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6606/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6606'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'prefer-nullish-coalescing'; diff --git a/packages/jsts/src/rules/S6606/rule.ts b/packages/jsts/src/rules/S6606/rule.ts index ce467ca7f53..0b5ab15b1b8 100644 --- a/packages/jsts/src/rules/S6606/rule.ts +++ b/packages/jsts/src/rules/S6606/rule.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 { type Rule } from 'eslint'; import { generateMeta, diff --git a/packages/jsts/src/rules/S6627/generated-meta.ts b/packages/jsts/src/rules/S6627/generated-meta.ts new file mode 100644 index 00000000000..2801b1a9d6c --- /dev/null +++ b/packages/jsts/src/rules/S6627/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: 'Users should not use internal APIs', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6627/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6627'; diff --git a/packages/jsts/src/rules/S6627/meta.ts b/packages/jsts/src/rules/S6627/meta.ts index 2801b1a9d6c..a14687c042c 100644 --- a/packages/jsts/src/rules/S6627/meta.ts +++ b/packages/jsts/src/rules/S6627/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: 'Users should not use internal APIs', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6627/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6627'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-internal-api-use'; diff --git a/packages/jsts/src/rules/S6635/generated-meta.ts b/packages/jsts/src/rules/S6635/generated-meta.ts new file mode 100644 index 00000000000..dfbaddc57f2 --- /dev/null +++ b/packages/jsts/src/rules/S6635/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: 'Constructors should not return values', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6635/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6635'; diff --git a/packages/jsts/src/rules/S6635/index.ts b/packages/jsts/src/rules/S6635/index.ts new file mode 100644 index 00000000000..01282cbf1e2 --- /dev/null +++ b/packages/jsts/src/rules/S6635/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-constructor-return'); diff --git a/packages/jsts/src/rules/S6635/meta.ts b/packages/jsts/src/rules/S6635/meta.ts new file mode 100644 index 00000000000..9d03011f141 --- /dev/null +++ b/packages/jsts/src/rules/S6635/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-constructor-return'; diff --git a/packages/jsts/src/rules/S6637/generated-meta.ts b/packages/jsts/src/rules/S6637/generated-meta.ts new file mode 100644 index 00000000000..97eacc82b11 --- /dev/null +++ b/packages/jsts/src/rules/S6637/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 calls to ".bind()" should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6637/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6637'; diff --git a/packages/jsts/src/rules/S6637/index.ts b/packages/jsts/src/rules/S6637/index.ts new file mode 100644 index 00000000000..91ec6288fa0 --- /dev/null +++ b/packages/jsts/src/rules/S6637/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-extra-bind'); diff --git a/packages/jsts/src/rules/S6637/meta.ts b/packages/jsts/src/rules/S6637/meta.ts new file mode 100644 index 00000000000..c8231adcb77 --- /dev/null +++ b/packages/jsts/src/rules/S6637/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-extra-bind'; diff --git a/packages/jsts/src/rules/S6638/generated-meta.ts b/packages/jsts/src/rules/S6638/generated-meta.ts new file mode 100644 index 00000000000..0f0a972ad68 --- /dev/null +++ b/packages/jsts/src/rules/S6638/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: 'Binary expressions should not always return the same value', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6638/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6638'; diff --git a/packages/jsts/src/rules/S6638/index.ts b/packages/jsts/src/rules/S6638/index.ts new file mode 100644 index 00000000000..7fb81425349 --- /dev/null +++ b/packages/jsts/src/rules/S6638/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-constant-binary-expression'); diff --git a/packages/jsts/src/rules/S6638/meta.ts b/packages/jsts/src/rules/S6638/meta.ts new file mode 100644 index 00000000000..028ea4fe8e1 --- /dev/null +++ b/packages/jsts/src/rules/S6638/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-constant-binary-expression'; diff --git a/packages/jsts/src/rules/S6643/generated-meta.ts b/packages/jsts/src/rules/S6643/generated-meta.ts new file mode 100644 index 00000000000..0058097808c --- /dev/null +++ b/packages/jsts/src/rules/S6643/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: 'Prototypes of builtin objects should not be modified', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6643/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6643'; diff --git a/packages/jsts/src/rules/S6643/index.ts b/packages/jsts/src/rules/S6643/index.ts index 87269c443dd..16b54667480 100644 --- a/packages/jsts/src/rules/S6643/index.ts +++ b/packages/jsts/src/rules/S6643/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-extend-native']); +export const rule = decorate(getESLintCoreRule('no-extend-native')); diff --git a/packages/jsts/src/rules/S6643/meta.ts b/packages/jsts/src/rules/S6643/meta.ts index 0058097808c..9b3b392b733 100644 --- a/packages/jsts/src/rules/S6643/meta.ts +++ b/packages/jsts/src/rules/S6643/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: 'Prototypes of builtin objects should not be modified', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6643/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6643'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-extend-native'; diff --git a/packages/jsts/src/rules/S6644/generated-meta.ts b/packages/jsts/src/rules/S6644/generated-meta.ts new file mode 100644 index 00000000000..89c219ef0d6 --- /dev/null +++ b/packages/jsts/src/rules/S6644/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: 'Ternary operator should not be used instead of simpler alternatives', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6644/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6644'; diff --git a/packages/jsts/src/rules/S6644/index.ts b/packages/jsts/src/rules/S6644/index.ts new file mode 100644 index 00000000000..8f2f049efaf --- /dev/null +++ b/packages/jsts/src/rules/S6644/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-unneeded-ternary'); diff --git a/packages/jsts/src/rules/S6644/meta.ts b/packages/jsts/src/rules/S6644/meta.ts new file mode 100644 index 00000000000..00cf2bec75a --- /dev/null +++ b/packages/jsts/src/rules/S6644/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-unneeded-ternary'; diff --git a/packages/jsts/src/rules/S6645/generated-meta.ts b/packages/jsts/src/rules/S6645/generated-meta.ts new file mode 100644 index 00000000000..7837fcd74da --- /dev/null +++ b/packages/jsts/src/rules/S6645/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 not be initialized to undefined', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6645/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6645'; diff --git a/packages/jsts/src/rules/S6645/index.ts b/packages/jsts/src/rules/S6645/index.ts new file mode 100644 index 00000000000..cc8a211a4be --- /dev/null +++ b/packages/jsts/src/rules/S6645/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-undef-init'); diff --git a/packages/jsts/src/rules/S6645/meta.ts b/packages/jsts/src/rules/S6645/meta.ts new file mode 100644 index 00000000000..9d448fb688e --- /dev/null +++ b/packages/jsts/src/rules/S6645/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-undef-init'; diff --git a/packages/jsts/src/rules/S6647/generated-meta.ts b/packages/jsts/src/rules/S6647/generated-meta.ts new file mode 100644 index 00000000000..38ee7e2a263 --- /dev/null +++ b/packages/jsts/src/rules/S6647/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 constructors should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6647/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6647'; diff --git a/packages/jsts/src/rules/S6647/meta.ts b/packages/jsts/src/rules/S6647/meta.ts index 38ee7e2a263..0d71cc758db 100644 --- a/packages/jsts/src/rules/S6647/meta.ts +++ b/packages/jsts/src/rules/S6647/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 constructors should be removed', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6647/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6647'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-useless-constructor'; diff --git a/packages/jsts/src/rules/S6647/rule.ts b/packages/jsts/src/rules/S6647/rule.ts index 609951b518c..6706e6b6664 100644 --- a/packages/jsts/src/rules/S6647/rule.ts +++ b/packages/jsts/src/rules/S6647/rule.ts @@ -19,7 +19,7 @@ */ import type { TSESTree } from '@typescript-eslint/utils'; import type { Rule } from 'eslint'; -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; import { getVariableFromName } from '../helpers/index.js'; import type estree from 'estree'; @@ -96,7 +96,7 @@ function checkInheritance(node: TSESTree.MethodDefinition, context: Rule.RuleCon return true; } -const eslintNoUselessConstructor = eslintRules['no-useless-constructor']; +const eslintNoUselessConstructor = getESLintCoreRule('no-useless-constructor'); const originalRule: Rule.RuleModule = { meta: eslintNoUselessConstructor.meta, diff --git a/packages/jsts/src/rules/S6650/generated-meta.ts b/packages/jsts/src/rules/S6650/generated-meta.ts new file mode 100644 index 00000000000..ffde3814e70 --- /dev/null +++ b/packages/jsts/src/rules/S6650/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: + 'Renaming import, export, and destructuring assignments should not be to the same name', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6650/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6650'; diff --git a/packages/jsts/src/rules/S6650/index.ts b/packages/jsts/src/rules/S6650/index.ts new file mode 100644 index 00000000000..f83813a3a09 --- /dev/null +++ b/packages/jsts/src/rules/S6650/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-useless-rename'); diff --git a/packages/jsts/src/rules/S6650/meta.ts b/packages/jsts/src/rules/S6650/meta.ts new file mode 100644 index 00000000000..2997ec71920 --- /dev/null +++ b/packages/jsts/src/rules/S6650/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-useless-rename'; diff --git a/packages/jsts/src/rules/S6653/generated-meta.ts b/packages/jsts/src/rules/S6653/generated-meta.ts new file mode 100644 index 00000000000..98f5cf19c66 --- /dev/null +++ b/packages/jsts/src/rules/S6653/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: 'Use Object.hasOwn static method instead of hasOwnProperty', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6653/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6653'; diff --git a/packages/jsts/src/rules/S6653/index.ts b/packages/jsts/src/rules/S6653/index.ts new file mode 100644 index 00000000000..085ee4eeeb4 --- /dev/null +++ b/packages/jsts/src/rules/S6653/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-object-has-own'); diff --git a/packages/jsts/src/rules/S6653/meta.ts b/packages/jsts/src/rules/S6653/meta.ts new file mode 100644 index 00000000000..11be76f6761 --- /dev/null +++ b/packages/jsts/src/rules/S6653/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-object-has-own'; diff --git a/packages/jsts/src/rules/S6654/generated-meta.ts b/packages/jsts/src/rules/S6654/generated-meta.ts new file mode 100644 index 00000000000..ce3e2e7ad3a --- /dev/null +++ b/packages/jsts/src/rules/S6654/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: '__proto__ property should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6654/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6654'; diff --git a/packages/jsts/src/rules/S6654/index.ts b/packages/jsts/src/rules/S6654/index.ts new file mode 100644 index 00000000000..66da681df8b --- /dev/null +++ b/packages/jsts/src/rules/S6654/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-proto'); diff --git a/packages/jsts/src/rules/S6654/meta.ts b/packages/jsts/src/rules/S6654/meta.ts new file mode 100644 index 00000000000..7b6f03cfe87 --- /dev/null +++ b/packages/jsts/src/rules/S6654/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-proto'; diff --git a/packages/jsts/src/rules/S6657/generated-meta.ts b/packages/jsts/src/rules/S6657/generated-meta.ts new file mode 100644 index 00000000000..76c93db2352 --- /dev/null +++ b/packages/jsts/src/rules/S6657/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 escape sequences should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6657/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6657'; diff --git a/packages/jsts/src/rules/S6657/index.ts b/packages/jsts/src/rules/S6657/index.ts new file mode 100644 index 00000000000..452c201a887 --- /dev/null +++ b/packages/jsts/src/rules/S6657/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-escape'); diff --git a/packages/jsts/src/rules/S6657/meta.ts b/packages/jsts/src/rules/S6657/meta.ts new file mode 100644 index 00000000000..bb978afa371 --- /dev/null +++ b/packages/jsts/src/rules/S6657/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-escape'; diff --git a/packages/jsts/src/rules/S6660/generated-meta.ts b/packages/jsts/src/rules/S6660/generated-meta.ts new file mode 100644 index 00000000000..1e2269239d6 --- /dev/null +++ b/packages/jsts/src/rules/S6660/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: 'If statements should not be the only statement in else blocks', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6660/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6660'; diff --git a/packages/jsts/src/rules/S6660/index.ts b/packages/jsts/src/rules/S6660/index.ts index fd66255b157..ccb71f35e82 100644 --- a/packages/jsts/src/rules/S6660/index.ts +++ b/packages/jsts/src/rules/S6660/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-lonely-if']); +export const rule = decorate(getESLintCoreRule('no-lonely-if')); diff --git a/packages/jsts/src/rules/S6660/meta.ts b/packages/jsts/src/rules/S6660/meta.ts index 1e2269239d6..269a860b0d3 100644 --- a/packages/jsts/src/rules/S6660/meta.ts +++ b/packages/jsts/src/rules/S6660/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: 'If statements should not be the only statement in else blocks', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6660/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6660'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-lonely-if'; diff --git a/packages/jsts/src/rules/S6661/generated-meta.ts b/packages/jsts/src/rules/S6661/generated-meta.ts new file mode 100644 index 00000000000..aef8d5096dc --- /dev/null +++ b/packages/jsts/src/rules/S6661/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 spread syntax should be used instead of "Object.assign"', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6661/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6661'; diff --git a/packages/jsts/src/rules/S6661/index.ts b/packages/jsts/src/rules/S6661/index.ts index ddab021818f..ce3baae9765 100644 --- a/packages/jsts/src/rules/S6661/index.ts +++ b/packages/jsts/src/rules/S6661/index.ts @@ -18,12 +18,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import type { Rule } from 'eslint'; -import { eslintRules } from '../core/index.js'; +import { getESLintCoreRule } from '../core/index.js'; import { decorate } from './decorator.js'; import { dirname } from 'path/posix'; import { toUnixPath, isSupported } from '../helpers/index.js'; -const decorated = decorate(eslintRules['prefer-object-spread']); +const decorated = decorate(getESLintCoreRule('prefer-object-spread')); export const rule: Rule.RuleModule = { meta: decorated.meta, diff --git a/packages/jsts/src/rules/S6661/meta.ts b/packages/jsts/src/rules/S6661/meta.ts index aef8d5096dc..9bdf3afd38a 100644 --- a/packages/jsts/src/rules/S6661/meta.ts +++ b/packages/jsts/src/rules/S6661/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 spread syntax should be used instead of "Object.assign"', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6661/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6661'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'prefer-object-spread'; diff --git a/packages/jsts/src/rules/S6666/generated-meta.ts b/packages/jsts/src/rules/S6666/generated-meta.ts new file mode 100644 index 00000000000..4b7954fa9e5 --- /dev/null +++ b/packages/jsts/src/rules/S6666/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: 'Spread syntax should be used instead of "apply()"', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6666/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6666'; diff --git a/packages/jsts/src/rules/S6666/index.ts b/packages/jsts/src/rules/S6666/index.ts index ac8993ed84d..adb3d13e3ae 100644 --- a/packages/jsts/src/rules/S6666/index.ts +++ b/packages/jsts/src/rules/S6666/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-spread']); +export const rule = decorate(getESLintCoreRule('prefer-spread')); diff --git a/packages/jsts/src/rules/S6666/meta.ts b/packages/jsts/src/rules/S6666/meta.ts index 4b7954fa9e5..a29a0292fe5 100644 --- a/packages/jsts/src/rules/S6666/meta.ts +++ b/packages/jsts/src/rules/S6666/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: 'Spread syntax should be used instead of "apply()"', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6666/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6666'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'prefer-spread'; diff --git a/packages/jsts/src/rules/S6671/generated-meta.ts b/packages/jsts/src/rules/S6671/generated-meta.ts new file mode 100644 index 00000000000..7cb181560dc --- /dev/null +++ b/packages/jsts/src/rules/S6671/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: 'Literals should not be used for promise rejection', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6671/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6671'; diff --git a/packages/jsts/src/rules/S6671/index.ts b/packages/jsts/src/rules/S6671/index.ts new file mode 100644 index 00000000000..7708cb1553d --- /dev/null +++ b/packages/jsts/src/rules/S6671/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-promise-reject-errors']; diff --git a/packages/jsts/src/rules/S6671/meta.ts b/packages/jsts/src/rules/S6671/meta.ts new file mode 100644 index 00000000000..2bfd51e6868 --- /dev/null +++ b/packages/jsts/src/rules/S6671/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-promise-reject-errors'; diff --git a/packages/jsts/src/rules/S6676/generated-meta.ts b/packages/jsts/src/rules/S6676/generated-meta.ts new file mode 100644 index 00000000000..8799cbd04ea --- /dev/null +++ b/packages/jsts/src/rules/S6676/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: 'Calls to ".call()" and ".apply()" methods should not be redundant', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6676/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6676'; diff --git a/packages/jsts/src/rules/S6676/index.ts b/packages/jsts/src/rules/S6676/index.ts index 423610df682..607acbde402 100644 --- a/packages/jsts/src/rules/S6676/index.ts +++ b/packages/jsts/src/rules/S6676/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-useless-call']); +export const rule = decorate(getESLintCoreRule('no-useless-call')); diff --git a/packages/jsts/src/rules/S6676/meta.ts b/packages/jsts/src/rules/S6676/meta.ts index 8799cbd04ea..db92b521aff 100644 --- a/packages/jsts/src/rules/S6676/meta.ts +++ b/packages/jsts/src/rules/S6676/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: 'Calls to ".call()" and ".apply()" methods should not be redundant', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6676/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6676'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-useless-call'; diff --git a/packages/jsts/src/rules/S6679/generated-meta.ts b/packages/jsts/src/rules/S6679/generated-meta.ts new file mode 100644 index 00000000000..56910d6d636 --- /dev/null +++ b/packages/jsts/src/rules/S6679/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: '"Number.isNaN()" should be used to check for "NaN" value', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6679/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6679'; diff --git a/packages/jsts/src/rules/S6679/index.ts b/packages/jsts/src/rules/S6679/index.ts index 50c8333be6b..66f64b1749d 100644 --- a/packages/jsts/src/rules/S6679/index.ts +++ b/packages/jsts/src/rules/S6679/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-self-compare']); +export const rule = decorate(getESLintCoreRule('no-self-compare')); diff --git a/packages/jsts/src/rules/S6679/meta.ts b/packages/jsts/src/rules/S6679/meta.ts index 56910d6d636..a3e92078884 100644 --- a/packages/jsts/src/rules/S6679/meta.ts +++ b/packages/jsts/src/rules/S6679/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: '"Number.isNaN()" should be used to check for "NaN" value', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6679/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6679'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-self-compare'; diff --git a/packages/jsts/src/rules/S6746/generated-meta.ts b/packages/jsts/src/rules/S6746/generated-meta.ts new file mode 100644 index 00000000000..f1bab21bd5f --- /dev/null +++ b/packages/jsts/src/rules/S6746/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: 'In React "this.state" should not be mutated directly', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6746/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6746'; diff --git a/packages/jsts/src/rules/S6746/index.ts b/packages/jsts/src/rules/S6746/index.ts new file mode 100644 index 00000000000..a269d09ca9a --- /dev/null +++ b/packages/jsts/src/rules/S6746/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-react'; +export const rule = rules['no-direct-mutation-state']; diff --git a/packages/jsts/src/rules/S6746/meta.ts b/packages/jsts/src/rules/S6746/meta.ts new file mode 100644 index 00000000000..54779dc3c77 --- /dev/null +++ b/packages/jsts/src/rules/S6746/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-direct-mutation-state'; diff --git a/packages/jsts/src/rules/S6747/generated-meta.ts b/packages/jsts/src/rules/S6747/generated-meta.ts new file mode 100644 index 00000000000..abdbbf3acb6 --- /dev/null +++ b/packages/jsts/src/rules/S6747/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: 'JSX elements should not use unknown properties and attributes', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6747/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6747'; diff --git a/packages/jsts/src/rules/S6747/meta.ts b/packages/jsts/src/rules/S6747/meta.ts index abdbbf3acb6..b8f635a2390 100644 --- a/packages/jsts/src/rules/S6747/meta.ts +++ b/packages/jsts/src/rules/S6747/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: 'JSX elements should not use unknown properties and attributes', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6747/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6747'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-unknown-property'; diff --git a/packages/jsts/src/rules/S6748/generated-meta.ts b/packages/jsts/src/rules/S6748/generated-meta.ts new file mode 100644 index 00000000000..fa99e856b44 --- /dev/null +++ b/packages/jsts/src/rules/S6748/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: 'React "children" should not be passed as prop', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6748/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6748'; diff --git a/packages/jsts/src/rules/S6748/index.ts b/packages/jsts/src/rules/S6748/index.ts new file mode 100644 index 00000000000..fd38a094f29 --- /dev/null +++ b/packages/jsts/src/rules/S6748/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-react'; +export const rule = rules['no-children-prop']; diff --git a/packages/jsts/src/rules/S6748/meta.ts b/packages/jsts/src/rules/S6748/meta.ts new file mode 100644 index 00000000000..abe5ce57f8f --- /dev/null +++ b/packages/jsts/src/rules/S6748/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-children-prop'; diff --git a/packages/jsts/src/rules/S6749/generated-meta.ts b/packages/jsts/src/rules/S6749/generated-meta.ts new file mode 100644 index 00000000000..a1f51bfaef7 --- /dev/null +++ b/packages/jsts/src/rules/S6749/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 React fragments should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6749/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6749'; diff --git a/packages/jsts/src/rules/S6749/meta.ts b/packages/jsts/src/rules/S6749/meta.ts index a1f51bfaef7..53e8b691996 100644 --- a/packages/jsts/src/rules/S6749/meta.ts +++ b/packages/jsts/src/rules/S6749/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: 'Redundant React fragments should be removed', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6749/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6749'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'jsx-no-useless-fragment'; diff --git a/packages/jsts/src/rules/S6750/generated-meta.ts b/packages/jsts/src/rules/S6750/generated-meta.ts new file mode 100644 index 00000000000..2f0ec4ad457 --- /dev/null +++ b/packages/jsts/src/rules/S6750/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 return value of "ReactDOM.render" should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6750/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6750'; diff --git a/packages/jsts/src/rules/S6750/index.ts b/packages/jsts/src/rules/S6750/index.ts new file mode 100644 index 00000000000..48727fa5020 --- /dev/null +++ b/packages/jsts/src/rules/S6750/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-react'; +export const rule = rules['no-render-return-value']; diff --git a/packages/jsts/src/rules/S6750/meta.ts b/packages/jsts/src/rules/S6750/meta.ts new file mode 100644 index 00000000000..5a328f88ba7 --- /dev/null +++ b/packages/jsts/src/rules/S6750/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-render-return-value'; diff --git a/packages/jsts/src/rules/S6754/generated-meta.ts b/packages/jsts/src/rules/S6754/generated-meta.ts new file mode 100644 index 00000000000..0f449da9693 --- /dev/null +++ b/packages/jsts/src/rules/S6754/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 return value of "useState" should be destructured and named symmetrically', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6754/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6754'; diff --git a/packages/jsts/src/rules/S6754/meta.ts b/packages/jsts/src/rules/S6754/meta.ts index 0f449da9693..37077becc78 100644 --- a/packages/jsts/src/rules/S6754/meta.ts +++ b/packages/jsts/src/rules/S6754/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 return value of "useState" should be destructured and named symmetrically', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6754/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6754'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'hook-use-state'; diff --git a/packages/jsts/src/rules/S6756/generated-meta.ts b/packages/jsts/src/rules/S6756/generated-meta.ts new file mode 100644 index 00000000000..449982808ff --- /dev/null +++ b/packages/jsts/src/rules/S6756/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: '"setState" should use a callback when referencing the previous state', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6756/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6756'; diff --git a/packages/jsts/src/rules/S6756/index.ts b/packages/jsts/src/rules/S6756/index.ts new file mode 100644 index 00000000000..8f05b4d7d0d --- /dev/null +++ b/packages/jsts/src/rules/S6756/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-react'; +export const rule = rules['no-access-state-in-setstate']; diff --git a/packages/jsts/src/rules/S6756/meta.ts b/packages/jsts/src/rules/S6756/meta.ts new file mode 100644 index 00000000000..4e2c1d22a6e --- /dev/null +++ b/packages/jsts/src/rules/S6756/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-access-state-in-setstate'; diff --git a/packages/jsts/src/rules/S6757/generated-meta.ts b/packages/jsts/src/rules/S6757/generated-meta.ts new file mode 100644 index 00000000000..a8ea00b3214 --- /dev/null +++ b/packages/jsts/src/rules/S6757/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: '"this" should not be used in functional components', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6757/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6757'; diff --git a/packages/jsts/src/rules/S6757/index.ts b/packages/jsts/src/rules/S6757/index.ts new file mode 100644 index 00000000000..702891b12ae --- /dev/null +++ b/packages/jsts/src/rules/S6757/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-react'; +export const rule = rules['no-this-in-sfc']; diff --git a/packages/jsts/src/rules/S6757/meta.ts b/packages/jsts/src/rules/S6757/meta.ts new file mode 100644 index 00000000000..5e2be56c94b --- /dev/null +++ b/packages/jsts/src/rules/S6757/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-this-in-sfc'; diff --git a/packages/jsts/src/rules/S6759/generated-meta.ts b/packages/jsts/src/rules/S6759/generated-meta.ts new file mode 100644 index 00000000000..be17b9a8310 --- /dev/null +++ b/packages/jsts/src/rules/S6759/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: 'React props should be read-only', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6759/javascript', + requiresTypeChecking: true, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6759'; diff --git a/packages/jsts/src/rules/S6759/meta.ts b/packages/jsts/src/rules/S6759/meta.ts index be17b9a8310..ed5b53d1568 100644 --- a/packages/jsts/src/rules/S6759/meta.ts +++ b/packages/jsts/src/rules/S6759/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: 'React props should be read-only', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6759/javascript', - requiresTypeChecking: true, - }, - fixable: 'code', -}; - -export const sonarKey = 'S6759'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'prefer-read-only-props'; diff --git a/packages/jsts/src/rules/S6761/generated-meta.ts b/packages/jsts/src/rules/S6761/generated-meta.ts new file mode 100644 index 00000000000..a87abfe4377 --- /dev/null +++ b/packages/jsts/src/rules/S6761/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: '"children" and "dangerouslySetInnerHTML" should not be used together', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6761/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6761'; diff --git a/packages/jsts/src/rules/S6761/index.ts b/packages/jsts/src/rules/S6761/index.ts new file mode 100644 index 00000000000..8acad16a806 --- /dev/null +++ b/packages/jsts/src/rules/S6761/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-react'; +export const rule = rules['no-danger-with-children']; diff --git a/packages/jsts/src/rules/S6761/meta.ts b/packages/jsts/src/rules/S6761/meta.ts new file mode 100644 index 00000000000..bef1109fb70 --- /dev/null +++ b/packages/jsts/src/rules/S6761/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-danger-with-children'; diff --git a/packages/jsts/src/rules/S6763/generated-meta.ts b/packages/jsts/src/rules/S6763/generated-meta.ts new file mode 100644 index 00000000000..d93bfde5ed4 --- /dev/null +++ b/packages/jsts/src/rules/S6763/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: + '"shouldComponentUpdate" should not be defined when extending "React.PureComponent"', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6763/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6763'; diff --git a/packages/jsts/src/rules/S6763/index.ts b/packages/jsts/src/rules/S6763/index.ts new file mode 100644 index 00000000000..7875074edd5 --- /dev/null +++ b/packages/jsts/src/rules/S6763/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-react'; +export const rule = rules['no-redundant-should-component-update']; diff --git a/packages/jsts/src/rules/S6763/meta.ts b/packages/jsts/src/rules/S6763/meta.ts new file mode 100644 index 00000000000..513bd9e90ee --- /dev/null +++ b/packages/jsts/src/rules/S6763/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-redundant-should-component-update'; diff --git a/packages/jsts/src/rules/S6766/generated-meta.ts b/packages/jsts/src/rules/S6766/generated-meta.ts new file mode 100644 index 00000000000..df889c63734 --- /dev/null +++ b/packages/jsts/src/rules/S6766/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: 'JSX special characters should be escaped', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6766/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6766'; diff --git a/packages/jsts/src/rules/S6766/index.ts b/packages/jsts/src/rules/S6766/index.ts new file mode 100644 index 00000000000..5f840a915ff --- /dev/null +++ b/packages/jsts/src/rules/S6766/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-react'; +export const rule = rules['no-unescaped-entities']; diff --git a/packages/jsts/src/rules/S6766/meta.ts b/packages/jsts/src/rules/S6766/meta.ts new file mode 100644 index 00000000000..c33525463b6 --- /dev/null +++ b/packages/jsts/src/rules/S6766/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-unescaped-entities'; diff --git a/packages/jsts/src/rules/S6767/generated-meta.ts b/packages/jsts/src/rules/S6767/generated-meta.ts new file mode 100644 index 00000000000..7b630e0ceaa --- /dev/null +++ b/packages/jsts/src/rules/S6767/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 React typed props should be removed', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6767/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6767'; diff --git a/packages/jsts/src/rules/S6767/index.ts b/packages/jsts/src/rules/S6767/index.ts new file mode 100644 index 00000000000..cf5a6620ef0 --- /dev/null +++ b/packages/jsts/src/rules/S6767/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-react'; +export const rule = rules['no-unused-prop-types']; diff --git a/packages/jsts/src/rules/S6767/meta.ts b/packages/jsts/src/rules/S6767/meta.ts new file mode 100644 index 00000000000..5ae83ee695e --- /dev/null +++ b/packages/jsts/src/rules/S6767/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-unused-prop-types'; diff --git a/packages/jsts/src/rules/S6770/generated-meta.ts b/packages/jsts/src/rules/S6770/generated-meta.ts new file mode 100644 index 00000000000..aa3042da305 --- /dev/null +++ b/packages/jsts/src/rules/S6770/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: 'User-defined JSX components should use Pascal case', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6770/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6770'; diff --git a/packages/jsts/src/rules/S6770/index.ts b/packages/jsts/src/rules/S6770/index.ts new file mode 100644 index 00000000000..53814ccddc8 --- /dev/null +++ b/packages/jsts/src/rules/S6770/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-react'; +export const rule = rules['jsx-pascal-case']; diff --git a/packages/jsts/src/rules/S6770/meta.ts b/packages/jsts/src/rules/S6770/meta.ts new file mode 100644 index 00000000000..dd6c16277d8 --- /dev/null +++ b/packages/jsts/src/rules/S6770/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 = 'jsx-pascal-case'; diff --git a/packages/jsts/src/rules/S6772/generated-meta.ts b/packages/jsts/src/rules/S6772/generated-meta.ts new file mode 100644 index 00000000000..a693b9d8b3b --- /dev/null +++ b/packages/jsts/src/rules/S6772/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: 'Spacing between inline elements should be explicit', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6772/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6772'; diff --git a/packages/jsts/src/rules/S6772/index.ts b/packages/jsts/src/rules/S6772/index.ts new file mode 100644 index 00000000000..c7d2b7c67b8 --- /dev/null +++ b/packages/jsts/src/rules/S6772/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-react'; +export const rule = rules['jsx-child-element-spacing']; diff --git a/packages/jsts/src/rules/S6772/meta.ts b/packages/jsts/src/rules/S6772/meta.ts new file mode 100644 index 00000000000..9ddbf211671 --- /dev/null +++ b/packages/jsts/src/rules/S6772/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 = 'jsx-child-element-spacing'; diff --git a/packages/jsts/src/rules/S6774/generated-meta.ts b/packages/jsts/src/rules/S6774/generated-meta.ts new file mode 100644 index 00000000000..f53407e0e97 --- /dev/null +++ b/packages/jsts/src/rules/S6774/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: 'React components should validate prop types', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6774/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6774'; diff --git a/packages/jsts/src/rules/S6774/index.ts b/packages/jsts/src/rules/S6774/index.ts new file mode 100644 index 00000000000..ee4b612ef52 --- /dev/null +++ b/packages/jsts/src/rules/S6774/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-react'; +export const rule = rules['prop-types']; diff --git a/packages/jsts/src/rules/S6774/meta.ts b/packages/jsts/src/rules/S6774/meta.ts new file mode 100644 index 00000000000..7dd2f484638 --- /dev/null +++ b/packages/jsts/src/rules/S6774/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 = 'prop-types'; diff --git a/packages/jsts/src/rules/S6775/generated-meta.ts b/packages/jsts/src/rules/S6775/generated-meta.ts new file mode 100644 index 00000000000..e609ba94d7f --- /dev/null +++ b/packages/jsts/src/rules/S6775/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: 'All "defaultProps" should have non-required PropTypes', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6775/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6775'; diff --git a/packages/jsts/src/rules/S6775/index.ts b/packages/jsts/src/rules/S6775/index.ts new file mode 100644 index 00000000000..8a387ce592c --- /dev/null +++ b/packages/jsts/src/rules/S6775/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-react'; +export const rule = rules['default-props-match-prop-types']; diff --git a/packages/jsts/src/rules/S6775/meta.ts b/packages/jsts/src/rules/S6775/meta.ts new file mode 100644 index 00000000000..043508fb778 --- /dev/null +++ b/packages/jsts/src/rules/S6775/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 = 'default-props-match-prop-types'; diff --git a/packages/jsts/src/rules/S6788/generated-meta.ts b/packages/jsts/src/rules/S6788/generated-meta.ts new file mode 100644 index 00000000000..7d2fe82fd89 --- /dev/null +++ b/packages/jsts/src/rules/S6788/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: 'React\'s "findDOMNode" should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6788/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6788'; diff --git a/packages/jsts/src/rules/S6788/meta.ts b/packages/jsts/src/rules/S6788/meta.ts index 7d2fe82fd89..4be119007ff 100644 --- a/packages/jsts/src/rules/S6788/meta.ts +++ b/packages/jsts/src/rules/S6788/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: 'React\'s "findDOMNode" should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6788/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6788'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-find-dom-node'; diff --git a/packages/jsts/src/rules/S6789/generated-meta.ts b/packages/jsts/src/rules/S6789/generated-meta.ts new file mode 100644 index 00000000000..3f895735fae --- /dev/null +++ b/packages/jsts/src/rules/S6789/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: 'React\'s "isMounted" should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6789/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6789'; diff --git a/packages/jsts/src/rules/S6789/index.ts b/packages/jsts/src/rules/S6789/index.ts new file mode 100644 index 00000000000..a6f3d048fb7 --- /dev/null +++ b/packages/jsts/src/rules/S6789/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-react'; +export const rule = rules['no-is-mounted']; diff --git a/packages/jsts/src/rules/S6789/meta.ts b/packages/jsts/src/rules/S6789/meta.ts new file mode 100644 index 00000000000..26d2937d6de --- /dev/null +++ b/packages/jsts/src/rules/S6789/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-is-mounted'; diff --git a/packages/jsts/src/rules/S6790/generated-meta.ts b/packages/jsts/src/rules/S6790/generated-meta.ts new file mode 100644 index 00000000000..7891f5d73b0 --- /dev/null +++ b/packages/jsts/src/rules/S6790/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: 'String references should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6790/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6790'; diff --git a/packages/jsts/src/rules/S6790/index.ts b/packages/jsts/src/rules/S6790/index.ts new file mode 100644 index 00000000000..12bd5d0bf2e --- /dev/null +++ b/packages/jsts/src/rules/S6790/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-react'; +export const rule = rules['no-string-refs']; diff --git a/packages/jsts/src/rules/S6790/meta.ts b/packages/jsts/src/rules/S6790/meta.ts new file mode 100644 index 00000000000..4235b6c45c5 --- /dev/null +++ b/packages/jsts/src/rules/S6790/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-string-refs'; diff --git a/packages/jsts/src/rules/S6791/generated-meta.ts b/packages/jsts/src/rules/S6791/generated-meta.ts new file mode 100644 index 00000000000..5578816dffd --- /dev/null +++ b/packages/jsts/src/rules/S6791/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: 'React legacy lifecycle methods should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6791/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6791'; diff --git a/packages/jsts/src/rules/S6791/meta.ts b/packages/jsts/src/rules/S6791/meta.ts index 5578816dffd..00878eed929 100644 --- a/packages/jsts/src/rules/S6791/meta.ts +++ b/packages/jsts/src/rules/S6791/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: 'React legacy lifecycle methods should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6791/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6791'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-unsafe'; diff --git a/packages/jsts/src/rules/S6793/generated-meta.ts b/packages/jsts/src/rules/S6793/generated-meta.ts new file mode 100644 index 00000000000..cdded67d1dc --- /dev/null +++ b/packages/jsts/src/rules/S6793/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: 'ARIA properties in DOM elements should have valid values', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6793/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6793'; diff --git a/packages/jsts/src/rules/S6793/index.ts b/packages/jsts/src/rules/S6793/index.ts new file mode 100644 index 00000000000..4e9401b2348 --- /dev/null +++ b/packages/jsts/src/rules/S6793/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['aria-proptypes']; diff --git a/packages/jsts/src/rules/S6793/meta.ts b/packages/jsts/src/rules/S6793/meta.ts new file mode 100644 index 00000000000..8ff2124fb15 --- /dev/null +++ b/packages/jsts/src/rules/S6793/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 = 'aria-proptypes'; diff --git a/packages/jsts/src/rules/S6807/generated-meta.ts b/packages/jsts/src/rules/S6807/generated-meta.ts new file mode 100644 index 00000000000..f42cd221c4e --- /dev/null +++ b/packages/jsts/src/rules/S6807/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: 'DOM elements with ARIA roles should have the required properties', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6807/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6807'; diff --git a/packages/jsts/src/rules/S6807/index.ts b/packages/jsts/src/rules/S6807/index.ts new file mode 100644 index 00000000000..09d2a4a69a1 --- /dev/null +++ b/packages/jsts/src/rules/S6807/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['role-has-required-aria-props']; diff --git a/packages/jsts/src/rules/S6807/meta.ts b/packages/jsts/src/rules/S6807/meta.ts new file mode 100644 index 00000000000..4187d34120a --- /dev/null +++ b/packages/jsts/src/rules/S6807/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 = 'role-has-required-aria-props'; diff --git a/packages/jsts/src/rules/S6811/generated-meta.ts b/packages/jsts/src/rules/S6811/generated-meta.ts new file mode 100644 index 00000000000..a9cad86b88e --- /dev/null +++ b/packages/jsts/src/rules/S6811/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: 'DOM elements with ARIA role should only have supported properties', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6811/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6811'; diff --git a/packages/jsts/src/rules/S6811/index.ts b/packages/jsts/src/rules/S6811/index.ts new file mode 100644 index 00000000000..3339d214058 --- /dev/null +++ b/packages/jsts/src/rules/S6811/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['role-supports-aria-props']; diff --git a/packages/jsts/src/rules/S6811/meta.ts b/packages/jsts/src/rules/S6811/meta.ts new file mode 100644 index 00000000000..f46bcd745d3 --- /dev/null +++ b/packages/jsts/src/rules/S6811/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 = 'role-supports-aria-props'; diff --git a/packages/jsts/src/rules/S6819/generated-meta.ts b/packages/jsts/src/rules/S6819/generated-meta.ts new file mode 100644 index 00000000000..e9c40837e9f --- /dev/null +++ b/packages/jsts/src/rules/S6819/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: 'Prefer tag over ARIA role', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6819/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6819'; diff --git a/packages/jsts/src/rules/S6819/index.ts b/packages/jsts/src/rules/S6819/index.ts new file mode 100644 index 00000000000..6a35a12f1e9 --- /dev/null +++ b/packages/jsts/src/rules/S6819/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['prefer-tag-over-role']; diff --git a/packages/jsts/src/rules/S6819/meta.ts b/packages/jsts/src/rules/S6819/meta.ts new file mode 100644 index 00000000000..ec9c5f60e05 --- /dev/null +++ b/packages/jsts/src/rules/S6819/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-tag-over-role'; diff --git a/packages/jsts/src/rules/S6821/generated-meta.ts b/packages/jsts/src/rules/S6821/generated-meta.ts new file mode 100644 index 00000000000..0119c3cd659 --- /dev/null +++ b/packages/jsts/src/rules/S6821/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: 'DOM elements with ARIA roles should have a valid non-abstract role', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6821/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6821'; diff --git a/packages/jsts/src/rules/S6821/index.ts b/packages/jsts/src/rules/S6821/index.ts new file mode 100644 index 00000000000..d9cc5150527 --- /dev/null +++ b/packages/jsts/src/rules/S6821/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['aria-role']; diff --git a/packages/jsts/src/rules/S6821/meta.ts b/packages/jsts/src/rules/S6821/meta.ts new file mode 100644 index 00000000000..0bb9062c7f0 --- /dev/null +++ b/packages/jsts/src/rules/S6821/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 = 'aria-role'; diff --git a/packages/jsts/src/rules/S6822/generated-meta.ts b/packages/jsts/src/rules/S6822/generated-meta.ts new file mode 100644 index 00000000000..59ed6e2fdb0 --- /dev/null +++ b/packages/jsts/src/rules/S6822/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: 'No redundant ARIA role', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6822/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6822'; diff --git a/packages/jsts/src/rules/S6822/index.ts b/packages/jsts/src/rules/S6822/index.ts new file mode 100644 index 00000000000..7beac77504f --- /dev/null +++ b/packages/jsts/src/rules/S6822/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['no-redundant-roles']; diff --git a/packages/jsts/src/rules/S6822/meta.ts b/packages/jsts/src/rules/S6822/meta.ts new file mode 100644 index 00000000000..8f808d78e17 --- /dev/null +++ b/packages/jsts/src/rules/S6822/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-redundant-roles'; diff --git a/packages/jsts/src/rules/S6823/generated-meta.ts b/packages/jsts/src/rules/S6823/generated-meta.ts new file mode 100644 index 00000000000..73759e7ba69 --- /dev/null +++ b/packages/jsts/src/rules/S6823/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: + 'DOM elements with the `aria-activedescendant` property should be accessible via the tab key', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6823/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6823'; diff --git a/packages/jsts/src/rules/S6823/index.ts b/packages/jsts/src/rules/S6823/index.ts new file mode 100644 index 00000000000..9235f673540 --- /dev/null +++ b/packages/jsts/src/rules/S6823/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['aria-activedescendant-has-tabindex']; diff --git a/packages/jsts/src/rules/S6823/meta.ts b/packages/jsts/src/rules/S6823/meta.ts new file mode 100644 index 00000000000..39b45cc3da6 --- /dev/null +++ b/packages/jsts/src/rules/S6823/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 = 'aria-activedescendant-has-tabindex'; diff --git a/packages/jsts/src/rules/S6824/generated-meta.ts b/packages/jsts/src/rules/S6824/generated-meta.ts new file mode 100644 index 00000000000..08a91440b87 --- /dev/null +++ b/packages/jsts/src/rules/S6824/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: 'No ARIA role or property for unsupported DOM elements', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6824/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6824'; diff --git a/packages/jsts/src/rules/S6824/index.ts b/packages/jsts/src/rules/S6824/index.ts new file mode 100644 index 00000000000..5990b72ab0d --- /dev/null +++ b/packages/jsts/src/rules/S6824/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['aria-unsupported-elements']; diff --git a/packages/jsts/src/rules/S6824/meta.ts b/packages/jsts/src/rules/S6824/meta.ts new file mode 100644 index 00000000000..1684f62ab3b --- /dev/null +++ b/packages/jsts/src/rules/S6824/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 = 'aria-unsupported-elements'; diff --git a/packages/jsts/src/rules/S6825/generated-meta.ts b/packages/jsts/src/rules/S6825/generated-meta.ts new file mode 100644 index 00000000000..9bb9cda3b31 --- /dev/null +++ b/packages/jsts/src/rules/S6825/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: 'Focusable elements should not have "aria-hidden" attribute', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6825/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6825'; diff --git a/packages/jsts/src/rules/S6825/index.ts b/packages/jsts/src/rules/S6825/index.ts new file mode 100644 index 00000000000..b686a88fef2 --- /dev/null +++ b/packages/jsts/src/rules/S6825/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['no-aria-hidden-on-focusable']; diff --git a/packages/jsts/src/rules/S6825/meta.ts b/packages/jsts/src/rules/S6825/meta.ts new file mode 100644 index 00000000000..13618a8c9fe --- /dev/null +++ b/packages/jsts/src/rules/S6825/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-aria-hidden-on-focusable'; diff --git a/packages/jsts/src/rules/S6827/generated-meta.ts b/packages/jsts/src/rules/S6827/generated-meta.ts new file mode 100644 index 00000000000..3e54a0b6138 --- /dev/null +++ b/packages/jsts/src/rules/S6827/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: 'Anchors should contain accessible content', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6827/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6827'; diff --git a/packages/jsts/src/rules/S6827/meta.ts b/packages/jsts/src/rules/S6827/meta.ts index 3e54a0b6138..07300a146da 100644 --- a/packages/jsts/src/rules/S6827/meta.ts +++ b/packages/jsts/src/rules/S6827/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: 'Anchors should contain accessible content', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6827/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6827'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'anchor-has-content'; diff --git a/packages/jsts/src/rules/S6836/generated-meta.ts b/packages/jsts/src/rules/S6836/generated-meta.ts new file mode 100644 index 00000000000..ac9299566b7 --- /dev/null +++ b/packages/jsts/src/rules/S6836/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: '"case" and "default" clauses should not contain lexical declarations', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6836/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6836'; diff --git a/packages/jsts/src/rules/S6836/index.ts b/packages/jsts/src/rules/S6836/index.ts new file mode 100644 index 00000000000..51cd5a31e05 --- /dev/null +++ b/packages/jsts/src/rules/S6836/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-case-declarations'); diff --git a/packages/jsts/src/rules/S6836/meta.ts b/packages/jsts/src/rules/S6836/meta.ts new file mode 100644 index 00000000000..d31c786b2d9 --- /dev/null +++ b/packages/jsts/src/rules/S6836/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-case-declarations'; diff --git a/packages/jsts/src/rules/S6840/generated-meta.ts b/packages/jsts/src/rules/S6840/generated-meta.ts new file mode 100644 index 00000000000..3a61ee20b2d --- /dev/null +++ b/packages/jsts/src/rules/S6840/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: 'DOM elements should use the "autocomplete" attribute correctly', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6840/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6840'; diff --git a/packages/jsts/src/rules/S6840/index.ts b/packages/jsts/src/rules/S6840/index.ts new file mode 100644 index 00000000000..ea5a331c96e --- /dev/null +++ b/packages/jsts/src/rules/S6840/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['autocomplete-valid']; diff --git a/packages/jsts/src/rules/S6840/meta.ts b/packages/jsts/src/rules/S6840/meta.ts new file mode 100644 index 00000000000..478c6ea095d --- /dev/null +++ b/packages/jsts/src/rules/S6840/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 = 'autocomplete-valid'; diff --git a/packages/jsts/src/rules/S6841/generated-meta.ts b/packages/jsts/src/rules/S6841/generated-meta.ts new file mode 100644 index 00000000000..58bf3083f81 --- /dev/null +++ b/packages/jsts/src/rules/S6841/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: '"tabIndex" values should be 0 or -1', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6841/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6841'; diff --git a/packages/jsts/src/rules/S6841/index.ts b/packages/jsts/src/rules/S6841/index.ts new file mode 100644 index 00000000000..9bcb0d0b495 --- /dev/null +++ b/packages/jsts/src/rules/S6841/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['tabindex-no-positive']; diff --git a/packages/jsts/src/rules/S6841/meta.ts b/packages/jsts/src/rules/S6841/meta.ts new file mode 100644 index 00000000000..105194fdc97 --- /dev/null +++ b/packages/jsts/src/rules/S6841/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 = 'tabindex-no-positive'; diff --git a/packages/jsts/src/rules/S6842/generated-meta.ts b/packages/jsts/src/rules/S6842/generated-meta.ts new file mode 100644 index 00000000000..d323b87e7da --- /dev/null +++ b/packages/jsts/src/rules/S6842/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: 'Non-interactive DOM elements should not have interactive ARIA roles', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6842/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6842'; diff --git a/packages/jsts/src/rules/S6842/index.ts b/packages/jsts/src/rules/S6842/index.ts new file mode 100644 index 00000000000..7bcef2a39a6 --- /dev/null +++ b/packages/jsts/src/rules/S6842/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['no-noninteractive-element-to-interactive-role']; diff --git a/packages/jsts/src/rules/S6842/meta.ts b/packages/jsts/src/rules/S6842/meta.ts new file mode 100644 index 00000000000..6cd852b50ba --- /dev/null +++ b/packages/jsts/src/rules/S6842/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-noninteractive-element-to-interactive-role'; diff --git a/packages/jsts/src/rules/S6843/generated-meta.ts b/packages/jsts/src/rules/S6843/generated-meta.ts new file mode 100644 index 00000000000..03b106d7fc3 --- /dev/null +++ b/packages/jsts/src/rules/S6843/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: 'Interactive DOM elements should not have non-interactive ARIA roles', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6843/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6843'; diff --git a/packages/jsts/src/rules/S6843/index.ts b/packages/jsts/src/rules/S6843/index.ts new file mode 100644 index 00000000000..a84cf9eaced --- /dev/null +++ b/packages/jsts/src/rules/S6843/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['no-interactive-element-to-noninteractive-role']; diff --git a/packages/jsts/src/rules/S6843/meta.ts b/packages/jsts/src/rules/S6843/meta.ts new file mode 100644 index 00000000000..b9f6a4d9f0a --- /dev/null +++ b/packages/jsts/src/rules/S6843/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-interactive-element-to-noninteractive-role'; diff --git a/packages/jsts/src/rules/S6844/generated-meta.ts b/packages/jsts/src/rules/S6844/generated-meta.ts new file mode 100644 index 00000000000..a115f95b3e3 --- /dev/null +++ b/packages/jsts/src/rules/S6844/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: 'Anchor tags should not be used as buttons', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6844/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6844'; diff --git a/packages/jsts/src/rules/S6844/meta.ts b/packages/jsts/src/rules/S6844/meta.ts index a115f95b3e3..3e5891508a5 100644 --- a/packages/jsts/src/rules/S6844/meta.ts +++ b/packages/jsts/src/rules/S6844/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: 'Anchor tags should not be used as buttons', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6844/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6844'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'anchor-is-valid'; diff --git a/packages/jsts/src/rules/S6845/generated-meta.ts b/packages/jsts/src/rules/S6845/generated-meta.ts new file mode 100644 index 00000000000..0c9a0d3237c --- /dev/null +++ b/packages/jsts/src/rules/S6845/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: 'Non-interactive DOM elements should not have the `tabIndex` property', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6845/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6845'; diff --git a/packages/jsts/src/rules/S6845/index.ts b/packages/jsts/src/rules/S6845/index.ts new file mode 100644 index 00000000000..52776bbc9ce --- /dev/null +++ b/packages/jsts/src/rules/S6845/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['no-noninteractive-tabindex']; diff --git a/packages/jsts/src/rules/S6845/meta.ts b/packages/jsts/src/rules/S6845/meta.ts new file mode 100644 index 00000000000..90655420c2f --- /dev/null +++ b/packages/jsts/src/rules/S6845/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-noninteractive-tabindex'; diff --git a/packages/jsts/src/rules/S6846/generated-meta.ts b/packages/jsts/src/rules/S6846/generated-meta.ts new file mode 100644 index 00000000000..0e253e6b5ac --- /dev/null +++ b/packages/jsts/src/rules/S6846/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: 'DOM elements should not use the "accesskey" property', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6846/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6846'; diff --git a/packages/jsts/src/rules/S6846/index.ts b/packages/jsts/src/rules/S6846/index.ts new file mode 100644 index 00000000000..e29b80f39df --- /dev/null +++ b/packages/jsts/src/rules/S6846/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['no-access-key']; diff --git a/packages/jsts/src/rules/S6846/meta.ts b/packages/jsts/src/rules/S6846/meta.ts new file mode 100644 index 00000000000..b8273c0cfa4 --- /dev/null +++ b/packages/jsts/src/rules/S6846/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-access-key'; diff --git a/packages/jsts/src/rules/S6847/generated-meta.ts b/packages/jsts/src/rules/S6847/generated-meta.ts new file mode 100644 index 00000000000..0b9554c32fc --- /dev/null +++ b/packages/jsts/src/rules/S6847/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: "Non-interactive elements shouldn't have event handlers", + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6847/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6847'; diff --git a/packages/jsts/src/rules/S6847/index.ts b/packages/jsts/src/rules/S6847/index.ts new file mode 100644 index 00000000000..275c48b556f --- /dev/null +++ b/packages/jsts/src/rules/S6847/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['no-noninteractive-element-interactions']; diff --git a/packages/jsts/src/rules/S6847/meta.ts b/packages/jsts/src/rules/S6847/meta.ts new file mode 100644 index 00000000000..f92ee9ccde4 --- /dev/null +++ b/packages/jsts/src/rules/S6847/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-noninteractive-element-interactions'; diff --git a/packages/jsts/src/rules/S6848/generated-meta.ts b/packages/jsts/src/rules/S6848/generated-meta.ts new file mode 100644 index 00000000000..0e6d48569ff --- /dev/null +++ b/packages/jsts/src/rules/S6848/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: 'Non-interactive DOM elements should not have an interactive handler', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6848/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6848'; diff --git a/packages/jsts/src/rules/S6848/index.ts b/packages/jsts/src/rules/S6848/index.ts new file mode 100644 index 00000000000..375a526dc42 --- /dev/null +++ b/packages/jsts/src/rules/S6848/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['no-static-element-interactions']; diff --git a/packages/jsts/src/rules/S6848/meta.ts b/packages/jsts/src/rules/S6848/meta.ts new file mode 100644 index 00000000000..13c87218291 --- /dev/null +++ b/packages/jsts/src/rules/S6848/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-static-element-interactions'; diff --git a/packages/jsts/src/rules/S6850/generated-meta.ts b/packages/jsts/src/rules/S6850/generated-meta.ts new file mode 100644 index 00000000000..d8a37eb4b31 --- /dev/null +++ b/packages/jsts/src/rules/S6850/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: 'Heading elements should have accessible content', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6850/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6850'; diff --git a/packages/jsts/src/rules/S6850/index.ts b/packages/jsts/src/rules/S6850/index.ts new file mode 100644 index 00000000000..d0ba8a2d610 --- /dev/null +++ b/packages/jsts/src/rules/S6850/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['heading-has-content']; diff --git a/packages/jsts/src/rules/S6850/meta.ts b/packages/jsts/src/rules/S6850/meta.ts new file mode 100644 index 00000000000..0659f15e14e --- /dev/null +++ b/packages/jsts/src/rules/S6850/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 = 'heading-has-content'; diff --git a/packages/jsts/src/rules/S6851/generated-meta.ts b/packages/jsts/src/rules/S6851/generated-meta.ts new file mode 100644 index 00000000000..fc6d08aa9eb --- /dev/null +++ b/packages/jsts/src/rules/S6851/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: 'Images should have a non-redundant alternate description', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6851/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6851'; diff --git a/packages/jsts/src/rules/S6851/index.ts b/packages/jsts/src/rules/S6851/index.ts new file mode 100644 index 00000000000..585d5c1e73c --- /dev/null +++ b/packages/jsts/src/rules/S6851/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['img-redundant-alt']; diff --git a/packages/jsts/src/rules/S6851/meta.ts b/packages/jsts/src/rules/S6851/meta.ts new file mode 100644 index 00000000000..b52eb038bc1 --- /dev/null +++ b/packages/jsts/src/rules/S6851/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 = 'img-redundant-alt'; diff --git a/packages/jsts/src/rules/S6852/generated-meta.ts b/packages/jsts/src/rules/S6852/generated-meta.ts new file mode 100644 index 00000000000..077cee108b1 --- /dev/null +++ b/packages/jsts/src/rules/S6852/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: 'Elements with an interactive role should support focus', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6852/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6852'; diff --git a/packages/jsts/src/rules/S6852/index.ts b/packages/jsts/src/rules/S6852/index.ts new file mode 100644 index 00000000000..8a5036d08d1 --- /dev/null +++ b/packages/jsts/src/rules/S6852/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['interactive-supports-focus']; diff --git a/packages/jsts/src/rules/S6852/meta.ts b/packages/jsts/src/rules/S6852/meta.ts new file mode 100644 index 00000000000..d855d5ef0da --- /dev/null +++ b/packages/jsts/src/rules/S6852/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 = 'interactive-supports-focus'; diff --git a/packages/jsts/src/rules/S6853/generated-meta.ts b/packages/jsts/src/rules/S6853/generated-meta.ts new file mode 100644 index 00000000000..e4a81eb226b --- /dev/null +++ b/packages/jsts/src/rules/S6853/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: 'Label elements should have a text label and an associated control', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6853/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6853'; diff --git a/packages/jsts/src/rules/S6853/meta.ts b/packages/jsts/src/rules/S6853/meta.ts index e4a81eb226b..99e5839126a 100644 --- a/packages/jsts/src/rules/S6853/meta.ts +++ b/packages/jsts/src/rules/S6853/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: 'Label elements should have a text label and an associated control', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6853/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6853'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'label-has-associated-control'; diff --git a/packages/jsts/src/rules/S6859/generated-meta.ts b/packages/jsts/src/rules/S6859/generated-meta.ts new file mode 100644 index 00000000000..5c56ae36a95 --- /dev/null +++ b/packages/jsts/src/rules/S6859/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 should not use absolute paths', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6859/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S6859'; diff --git a/packages/jsts/src/rules/S6859/index.ts b/packages/jsts/src/rules/S6859/index.ts new file mode 100644 index 00000000000..f27db6c0aa8 --- /dev/null +++ b/packages/jsts/src/rules/S6859/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-absolute-path']; diff --git a/packages/jsts/src/rules/S6859/meta.ts b/packages/jsts/src/rules/S6859/meta.ts new file mode 100644 index 00000000000..b1a7cc0250a --- /dev/null +++ b/packages/jsts/src/rules/S6859/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-absolute-path'; diff --git a/packages/jsts/src/rules/S6861/generated-meta.ts b/packages/jsts/src/rules/S6861/generated-meta.ts new file mode 100644 index 00000000000..d4c03f475ad --- /dev/null +++ b/packages/jsts/src/rules/S6861/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: 'Mutable variables should not be exported', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6861/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6861'; diff --git a/packages/jsts/src/rules/S6861/index.ts b/packages/jsts/src/rules/S6861/index.ts new file mode 100644 index 00000000000..8be07e5c8c5 --- /dev/null +++ b/packages/jsts/src/rules/S6861/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-mutable-exports']; diff --git a/packages/jsts/src/rules/S6861/meta.ts b/packages/jsts/src/rules/S6861/meta.ts new file mode 100644 index 00000000000..479ccd3e4d4 --- /dev/null +++ b/packages/jsts/src/rules/S6861/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-mutable-exports'; diff --git a/packages/jsts/src/rules/S6957/generated-meta.ts b/packages/jsts/src/rules/S6957/generated-meta.ts new file mode 100644 index 00000000000..8a0d10ae3c7 --- /dev/null +++ b/packages/jsts/src/rules/S6957/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: 'Deprecated React APIs should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6957/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6957'; +import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; +export const schema = { + type: 'array', + minItems: 0, + maxItems: 1, + items: [ + { + type: 'object', + properties: { + 'react-version': { + type: 'string', + }, + }, + additionalProperties: false, + }, + ], +} as const satisfies JSONSchema4; diff --git a/packages/jsts/src/rules/S6957/meta.ts b/packages/jsts/src/rules/S6957/meta.ts index 8a0d10ae3c7..8c5e897146e 100644 --- a/packages/jsts/src/rules/S6957/meta.ts +++ b/packages/jsts/src/rules/S6957/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: 'Deprecated React APIs should not be used', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6957/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6957'; -import { JSONSchema4 } from '@typescript-eslint/utils/json-schema'; -export const schema = { - type: 'array', - minItems: 0, - maxItems: 1, - items: [ - { - type: 'object', - properties: { - 'react-version': { - type: 'string', - }, - }, - additionalProperties: false, - }, - ], -} as const satisfies JSONSchema4; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-deprecated-react'; diff --git a/packages/jsts/src/rules/S6958/generated-meta.ts b/packages/jsts/src/rules/S6958/generated-meta.ts new file mode 100644 index 00000000000..7b25c3e15ff --- /dev/null +++ b/packages/jsts/src/rules/S6958/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: 'Literals should not be used as functions', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6958/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S6958'; diff --git a/packages/jsts/src/rules/S6958/meta.ts b/packages/jsts/src/rules/S6958/meta.ts index 7b25c3e15ff..229fac8eff0 100644 --- a/packages/jsts/src/rules/S6958/meta.ts +++ b/packages/jsts/src/rules/S6958/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: 'Literals should not be used as functions', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6958/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S6958'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-literal-call'; diff --git a/packages/jsts/src/rules/S6959/generated-meta.ts b/packages/jsts/src/rules/S6959/generated-meta.ts new file mode 100644 index 00000000000..a9140c53b83 --- /dev/null +++ b/packages/jsts/src/rules/S6959/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: '"Array.reduce()" calls should include an initial value', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S6959/javascript', + requiresTypeChecking: true, + }, +}; + +export const sonarKey = 'S6959'; diff --git a/packages/jsts/src/rules/S6959/meta.ts b/packages/jsts/src/rules/S6959/meta.ts index a9140c53b83..68894ac9b51 100644 --- a/packages/jsts/src/rules/S6959/meta.ts +++ b/packages/jsts/src/rules/S6959/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: '"Array.reduce()" calls should include an initial value', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S6959/javascript', - requiresTypeChecking: true, - }, -}; - -export const sonarKey = 'S6959'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'reduce-initial-value'; diff --git a/packages/jsts/src/rules/S7059/generated-meta.ts b/packages/jsts/src/rules/S7059/generated-meta.ts new file mode 100644 index 00000000000..5258e9b603d --- /dev/null +++ b/packages/jsts/src/rules/S7059/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: 'Constructors should not contain asynchronous operations', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S7059/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S7059'; diff --git a/packages/jsts/src/rules/S7059/meta.ts b/packages/jsts/src/rules/S7059/meta.ts index 5258e9b603d..66da76750d8 100644 --- a/packages/jsts/src/rules/S7059/meta.ts +++ b/packages/jsts/src/rules/S7059/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: 'Constructors should not contain asynchronous operations', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S7059/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S7059'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-async-constructor'; diff --git a/packages/jsts/src/rules/S7060/generated-meta.ts b/packages/jsts/src/rules/S7060/generated-meta.ts new file mode 100644 index 00000000000..5732e80f83e --- /dev/null +++ b/packages/jsts/src/rules/S7060/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 import itself', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S7060/javascript', + requiresTypeChecking: false, + }, + fixable: 'code', +}; + +export const sonarKey = 'S7060'; diff --git a/packages/jsts/src/rules/S7060/meta.ts b/packages/jsts/src/rules/S7060/meta.ts index 5732e80f83e..482a76c1aa1 100644 --- a/packages/jsts/src/rules/S7060/meta.ts +++ b/packages/jsts/src/rules/S7060/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 import itself', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S7060/javascript', - requiresTypeChecking: false, - }, - fixable: 'code', -}; - -export const sonarKey = 'S7060'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-self-import'; diff --git a/packages/jsts/src/rules/S878/generated-meta.ts b/packages/jsts/src/rules/S878/generated-meta.ts new file mode 100644 index 00000000000..96216c8e876 --- /dev/null +++ b/packages/jsts/src/rules/S878/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: 'Comma operator should not be used', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S878/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S878'; diff --git a/packages/jsts/src/rules/S878/index.ts b/packages/jsts/src/rules/S878/index.ts new file mode 100644 index 00000000000..8e4b5717654 --- /dev/null +++ b/packages/jsts/src/rules/S878/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-sequences'); diff --git a/packages/jsts/src/rules/S878/meta.ts b/packages/jsts/src/rules/S878/meta.ts new file mode 100644 index 00000000000..52a33c13dba --- /dev/null +++ b/packages/jsts/src/rules/S878/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-sequences'; diff --git a/packages/jsts/src/rules/S881/generated-meta.ts b/packages/jsts/src/rules/S881/generated-meta.ts new file mode 100644 index 00000000000..ce225315281 --- /dev/null +++ b/packages/jsts/src/rules/S881/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: + 'Increment (++) and decrement (--) operators should not be used in a method call or mixed with other operators in an expression', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S881/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S881'; diff --git a/packages/jsts/src/rules/S881/meta.ts b/packages/jsts/src/rules/S881/meta.ts index ce225315281..cc79c25ccd1 100644 --- a/packages/jsts/src/rules/S881/meta.ts +++ b/packages/jsts/src/rules/S881/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: - 'Increment (++) and decrement (--) operators should not be used in a method call or mixed with other operators in an expression', - recommended: false, - url: 'https://sonarsource.github.io/rspec/#/rspec/S881/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S881'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-nested-incdec'; diff --git a/packages/jsts/src/rules/S888/generated-meta.ts b/packages/jsts/src/rules/S888/generated-meta.ts new file mode 100644 index 00000000000..971f4da0298 --- /dev/null +++ b/packages/jsts/src/rules/S888/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: 'Equality operators should not be used in "for" loop termination conditions', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S888/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S888'; diff --git a/packages/jsts/src/rules/S888/meta.ts b/packages/jsts/src/rules/S888/meta.ts index 971f4da0298..1e5d3a5096b 100644 --- a/packages/jsts/src/rules/S888/meta.ts +++ b/packages/jsts/src/rules/S888/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: 'Equality operators should not be used in "for" loop termination conditions', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S888/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S888'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-equals-in-for-termination'; diff --git a/packages/jsts/src/rules/S905/generated-meta.ts b/packages/jsts/src/rules/S905/generated-meta.ts new file mode 100644 index 00000000000..4cb20ef21f7 --- /dev/null +++ b/packages/jsts/src/rules/S905/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: 'Non-empty statements should change control flow or have at least one side-effect', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S905/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S905'; diff --git a/packages/jsts/src/rules/S905/index.ts b/packages/jsts/src/rules/S905/index.ts index d08aa93bdfe..9a9083f6eb5 100644 --- a/packages/jsts/src/rules/S905/index.ts +++ b/packages/jsts/src/rules/S905/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-unused-expressions']); diff --git a/packages/jsts/src/rules/S905/meta.ts b/packages/jsts/src/rules/S905/meta.ts index 4cb20ef21f7..22ea9b2a3f4 100644 --- a/packages/jsts/src/rules/S905/meta.ts +++ b/packages/jsts/src/rules/S905/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: 'Non-empty statements should change control flow or have at least one side-effect', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S905/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S905'; +export * from './generated-meta.js'; +export const implementation = 'decorated'; +export const eslintId = 'no-unused-expressions'; diff --git a/packages/jsts/src/rules/S909/generated-meta.ts b/packages/jsts/src/rules/S909/generated-meta.ts new file mode 100644 index 00000000000..16616fb48e3 --- /dev/null +++ b/packages/jsts/src/rules/S909/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: '"continue" should not be used', + recommended: false, + url: 'https://sonarsource.github.io/rspec/#/rspec/S909/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S909'; diff --git a/packages/jsts/src/rules/S909/index.ts b/packages/jsts/src/rules/S909/index.ts new file mode 100644 index 00000000000..32b1a5eb54f --- /dev/null +++ b/packages/jsts/src/rules/S909/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-continue'); diff --git a/packages/jsts/src/rules/S909/meta.ts b/packages/jsts/src/rules/S909/meta.ts new file mode 100644 index 00000000000..042edf12252 --- /dev/null +++ b/packages/jsts/src/rules/S909/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-continue'; diff --git a/packages/jsts/src/rules/S930/generated-meta.ts b/packages/jsts/src/rules/S930/generated-meta.ts new file mode 100644 index 00000000000..c8a4db3c47a --- /dev/null +++ b/packages/jsts/src/rules/S930/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 calls should not pass extra arguments', + recommended: true, + url: 'https://sonarsource.github.io/rspec/#/rspec/S930/javascript', + requiresTypeChecking: false, + }, +}; + +export const sonarKey = 'S930'; diff --git a/packages/jsts/src/rules/S930/meta.ts b/packages/jsts/src/rules/S930/meta.ts index c8a4db3c47a..1dda13b3fdd 100644 --- a/packages/jsts/src/rules/S930/meta.ts +++ b/packages/jsts/src/rules/S930/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 calls should not pass extra arguments', - recommended: true, - url: 'https://sonarsource.github.io/rspec/#/rspec/S930/javascript', - requiresTypeChecking: false, - }, -}; - -export const sonarKey = 'S930'; +export * from './generated-meta.js'; +export const implementation = 'original'; +export const eslintId = 'no-extra-arguments'; diff --git a/packages/jsts/src/rules/core/index.ts b/packages/jsts/src/rules/core/index.ts index 00303ce211c..6fd495f7fae 100644 --- a/packages/jsts/src/rules/core/index.ts +++ b/packages/jsts/src/rules/core/index.ts @@ -17,12 +17,8 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Linter } from 'eslint'; +import { builtinRules } from 'eslint/use-at-your-own-risk'; -/** - * ESLint core rules. - * - * TODO: check typescript-eslint to import core rules: - * https://github.com/typescript-eslint/typescript-eslint/blob/75df60587d045438df448d76cc0ee093c8c31e28/packages/eslint-plugin/src/util/getESLintCoreRule.ts - */ -export const eslintRules = Object.fromEntries(new Linter({ configType: 'eslintrc' }).getRules()); +export function getESLintCoreRule(key: string) { + return builtinRules.get(key)!; +} diff --git a/packages/jsts/src/rules/decorated.ts b/packages/jsts/src/rules/decorated.ts deleted file mode 100644 index 4c222ea07ad..00000000000 --- a/packages/jsts/src/rules/decorated.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * SonarQube JavaScript Plugin - * Copyright (C) 2011-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public 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 { rule as S2376 } from './S2376/index.js'; // accessor-pairs -export { rule as S1077 } from './S1077/index.js'; // alt-text -export { rule as S6827 } from './S6827/index.js'; // anchor-has-content -export { rule as S6844 } from './S6844/index.js'; // anchor-is-valid -export { rule as S1105 } from './S1105/index.js'; // brace-style -export { rule as S1788 } from './S1788/index.js'; // default-param-last -export { rule as S5254 } from './S5254/index.js'; // html-has-lang -export { rule as S6749 } from './S6749/index.js'; // jsx-no-useless-fragment -export { rule as S6853 } from './S6853/index.js'; // label-has-associated-control -export { rule as S4084 } from './S4084/index.js'; // media-has-caption -export { rule as S2430 } from './S2430/index.js'; // new-cap -export { rule as S4275 } from './S4275/index.js'; // no-accessor-field-mismatch -export { rule as S6551 } from './S6551/index.js'; // no-base-to-string -export { rule as S1186 } from './S1186/index.js'; // no-empty-function -export { rule as S4023 } from './S4023/index.js'; // no-empty-interface -export { rule as S6643 } from './S6643/index.js'; // no-extend-native -export { rule as S1116 } from './S1116/index.js'; // no-extra-semi -export { rule as S6788 } from './S6788/index.js'; // no-find-dom-node -export { rule as S2189 } from './S2189/index.js'; // no-infinite-loop -export { rule as S6660 } from './S6660/index.js'; // no-lonely-if -export { rule as S6544 } from './S6544/index.js'; // no-misused-promises -export { rule as S2814 } from './S2814/index.js'; // no-redeclare -export { rule as S6440 } from './S6440/index.js'; // rules-of-hooks -export { rule as S6571 } from './S6571/index.js'; // no-redundant-type-constituents -export { rule as S6679 } from './S6679/index.js'; // no-self-compare -export { rule as S7060 } from './S7060/index.js'; // no-self-import -export { rule as S4327 } from './S4327/index.js'; // no-this-alias -export { rule as S3696 } from './S3696/index.js'; // no-throw-literal -export { rule as S6747 } from './S6747/index.js'; // no-unknown-property -export { rule as S1763 } from './S1763/index.js'; // no-unreachable -export { rule as S905 } from './S905/index.js'; // no-unused-expressions -export { rule as S1068 } from './S1068/index.js'; // no-unused-private-class-members -export { rule as S6676 } from './S6676/index.js'; // no-useless-call -export { rule as S6647 } from './S6647/index.js'; // no-useless-constructor -export { rule as S3504 } from './S3504/index.js'; // no-var -export { rule as S3498 } from './S3498/index.js'; // object-shorthand -export { rule as S6572 } from './S6572/index.js'; // prefer-enum-initializers -export { rule as S4138 } from './S4138/index.js'; // prefer-for-of -export { rule as S6598 } from './S6598/index.js'; // prefer-function-type -export { rule as S4156 } from './S4156/index.js'; // prefer-namespace-keyword -export { rule as S6606 } from './S6606/index.js'; // prefer-nullish-coalescing -export { rule as S6661 } from './S6661/index.js'; // prefer-object-spread -export { rule as S6666 } from './S6666/index.js'; // prefer-spread -export { rule as S6557 } from './S6557/index.js'; // prefer-string-starts-ends-with -export { rule as S3512 } from './S3512/index.js'; // prefer-template -export { rule as S1438 } from './S1438/index.js'; // semi -export { rule as S107 } from './S107/index.js'; // sonar-max-params -export { rule as S1534 } from './S1534/index.js'; // sonar-no-dupe-keys -export { rule as S131 } from './S131/index.js'; // switch-without-default -export { rule as S6535 } from './S6535/index.js'; // unnecessary-character-escapes -export { rule as S2688 } from './S2688/index.js'; // use-isnan diff --git a/packages/jsts/src/rules/external.ts b/packages/jsts/src/rules/external.ts deleted file mode 100644 index 83300212ed7..00000000000 --- a/packages/jsts/src/rules/external.ts +++ /dev/null @@ -1,141 +0,0 @@ -/* - * SonarQube JavaScript Plugin - * Copyright (C) 2011-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public 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 { eslintRules } from './core/index.js'; -import pkg from 'eslint-plugin-react'; -const reactPluginRules = pkg.rules; -import { tsEslintRules } from './typescript-eslint/index.js'; -import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'; -const { rules: a11yPluginRules } = jsxA11yPlugin; -import { rules as importPluginRules } from 'eslint-plugin-import'; - -export const rules = { - S103: eslintRules['max-len'], - S106: eslintRules['no-console'], - S108: eslintRules['no-empty'], - S1090: a11yPluginRules['iframe-has-title'], - S1117: tsEslintRules['no-shadow'], - S113: eslintRules['eol-last'], - S1131: eslintRules['no-trailing-spaces'], - S1143: eslintRules['no-unsafe-finally'], - S1199: eslintRules['no-lone-blocks'], - S121: eslintRules['curly'], - S122: eslintRules['max-statements-per-line'], - S1314: eslintRules['no-octal'], - S1321: eslintRules['no-with'], - S139: eslintRules['line-comment-position'], - S1440: eslintRules['eqeqeq'], - S1441: eslintRules['quotes'], - S1442: eslintRules['no-alert'], - S1516: eslintRules['no-multi-str'], - S1525: eslintRules['no-debugger'], - S1536: eslintRules['no-dupe-args'], - S1537: tsEslintRules['comma-dangle'], - S1539: eslintRules['strict'], - S1656: eslintRules['no-self-assign'], - S1774: eslintRules['no-ternary'], - S2094: tsEslintRules['no-extraneous-class'], - S2427: eslintRules['radix'], - S2432: eslintRules['no-setter-return'], - S2685: eslintRules['no-caller'], - S2933: tsEslintRules['prefer-readonly'], - S2966: tsEslintRules['no-non-null-assertion'], - S3257: tsEslintRules['no-inferrable-types'], - S3353: eslintRules['prefer-const'], - S3523: eslintRules['no-new-func'], - S3786: eslintRules['no-template-curly-in-string'], - S3799: eslintRules['no-empty-pattern'], - S3812: eslintRules['no-unsafe-negation'], - S3834: eslintRules['no-new-native-nonconstructor'], - S3863: importPluginRules['no-duplicates'], - S4124: tsEslintRules['no-misused-new'], - S4125: eslintRules['valid-typeof'], - S4136: tsEslintRules['adjacent-overload-signatures'], - S4137: tsEslintRules['consistent-type-assertions'], - S4140: eslintRules['no-sparse-arrays'], - S4157: tsEslintRules['no-unnecessary-type-arguments'], - S4204: tsEslintRules['no-explicit-any'], - S4325: tsEslintRules['no-unnecessary-type-assertion'], - S4326: eslintRules['no-return-await'], - S6325: eslintRules['prefer-regex-literals'], - S6435: reactPluginRules['require-render-return'], - S6438: reactPluginRules['jsx-no-comment-textnodes'], - S6480: reactPluginRules['jsx-no-bind'], - S6509: eslintRules['no-extra-boolean-cast'], - S6522: eslintRules['no-import-assign'], - S6523: eslintRules['no-unsafe-optional-chaining'], - S6534: eslintRules['no-loss-of-precision'], - S6550: tsEslintRules['prefer-literal-enum-member'], - S6565: tsEslintRules['prefer-return-this-type'], - S6568: tsEslintRules['no-confusing-non-null-assertion'], - S6569: tsEslintRules['no-unnecessary-type-constraint'], - S6578: tsEslintRules['no-duplicate-enum-values'], - S6583: tsEslintRules['no-mixed-enums'], - S6590: tsEslintRules['prefer-as-const'], - S6635: eslintRules['no-constructor-return'], - S6637: eslintRules['no-extra-bind'], - S6638: eslintRules['no-constant-binary-expression'], - S6644: eslintRules['no-unneeded-ternary'], - S6645: eslintRules['no-undef-init'], - S6650: eslintRules['no-useless-rename'], - S6653: eslintRules['prefer-object-has-own'], - S6654: eslintRules['no-proto'], - S6657: eslintRules['no-octal-escape'], - S6671: tsEslintRules['prefer-promise-reject-errors'], - S6746: reactPluginRules['no-direct-mutation-state'], - S6748: reactPluginRules['no-children-prop'], - S6750: reactPluginRules['no-render-return-value'], - S6756: reactPluginRules['no-access-state-in-setstate'], - S6757: reactPluginRules['no-this-in-sfc'], - S6761: reactPluginRules['no-danger-with-children'], - S6763: reactPluginRules['no-redundant-should-component-update'], - S6766: reactPluginRules['no-unescaped-entities'], - S6767: reactPluginRules['no-unused-prop-types'], - S6770: reactPluginRules['jsx-pascal-case'], - S6772: reactPluginRules['jsx-child-element-spacing'], - S6774: reactPluginRules['prop-types'], - S6775: reactPluginRules['default-props-match-prop-types'], - S6789: reactPluginRules['no-is-mounted'], - S6790: reactPluginRules['no-string-refs'], - S6793: a11yPluginRules['aria-proptypes'], - S6807: a11yPluginRules['role-has-required-aria-props'], - S6811: a11yPluginRules['role-supports-aria-props'], - S6819: a11yPluginRules['prefer-tag-over-role'], - S6821: a11yPluginRules['aria-role'], - S6822: a11yPluginRules['no-redundant-roles'], - S6823: a11yPluginRules['aria-activedescendant-has-tabindex'], - S6824: a11yPluginRules['aria-unsupported-elements'], - S6825: a11yPluginRules['no-aria-hidden-on-focusable'], - S6836: eslintRules['no-case-declarations'], - S6840: a11yPluginRules['autocomplete-valid'], - S6841: a11yPluginRules['tabindex-no-positive'], - S6842: a11yPluginRules['no-noninteractive-element-to-interactive-role'], - S6843: a11yPluginRules['no-interactive-element-to-noninteractive-role'], - S6845: a11yPluginRules['no-noninteractive-tabindex'], - S6846: a11yPluginRules['no-access-key'], - S6847: a11yPluginRules['no-noninteractive-element-interactions'], - S6848: a11yPluginRules['no-static-element-interactions'], - S6850: a11yPluginRules['heading-has-content'], - S6851: a11yPluginRules['img-redundant-alt'], - S6852: a11yPluginRules['interactive-supports-focus'], - S6859: importPluginRules['no-absolute-path'], - S6861: importPluginRules['no-mutable-exports'], - S878: eslintRules['no-sequences'], - S909: eslintRules['no-continue'], -}; diff --git a/packages/jsts/src/rules/index.ts b/packages/jsts/src/rules/index.ts index 65a13f8a3ec..de778e674df 100644 --- a/packages/jsts/src/rules/index.ts +++ b/packages/jsts/src/rules/index.ts @@ -18,14 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import * as originalRules from './original.js'; -import * as decoratedRules from './decorated.js'; -import * as externalRules from './external.js'; - -export const rules = { - ...originalRules, - ...decoratedRules, - ...externalRules.rules, -}; +export * as rules from './rules.js'; export * from './helpers/index.js'; diff --git a/packages/jsts/src/rules/original.ts b/packages/jsts/src/rules/original.ts deleted file mode 100644 index f8ff3c4189f..00000000000 --- a/packages/jsts/src/rules/original.ts +++ /dev/null @@ -1,297 +0,0 @@ -/* - * SonarQube JavaScript Plugin - * Copyright (C) 2011-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public 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 { rule as S5850 } from './S5850/index.js'; // anchor-precedence -export { rule as S3782 } from './S3782/index.js'; // argument-type -export { rule as S2234 } from './S2234/index.js'; // arguments-order -export { rule as S3513 } from './S3513/index.js'; // arguments-usage -export { rule as S3796 } from './S3796/index.js'; // array-callback-without-return -export { rule as S1528 } from './S1528/index.js'; // array-constructor -export { rule as S3524 } from './S3524/index.js'; // arrow-function-convention -export { rule as S2699 } from './S2699/index.js'; // assertions-in-tests -export { rule as S6333 } from './S6333/index.js'; // aws-apigateway-public-api -export { rule as S6329 } from './S6329/index.js'; // aws-ec2-rds-dms-public -export { rule as S6275 } from './S6275/index.js'; // aws-ec2-unencrypted-ebs-volume -export { rule as S6332 } from './S6332/index.js'; // aws-efs-unencrypted -export { rule as S6302 } from './S6302/index.js'; // aws-iam-all-privileges -export { rule as S6304 } from './S6304/index.js'; // aws-iam-all-resources-accessible -export { rule as S6317 } from './S6317/index.js'; // aws-iam-privilege-escalation -export { rule as S6270 } from './S6270/index.js'; // aws-iam-public-access -export { rule as S6308 } from './S6308/index.js'; // aws-opensearchservice-domain -export { rule as S6303 } from './S6303/index.js'; // aws-rds-unencrypted-databases -export { rule as S6321 } from './S6321/index.js'; // aws-restricted-ip-admin-access -export { rule as S6265 } from './S6265/index.js'; // aws-s3-bucket-granted-access -export { rule as S6249 } from './S6249/index.js'; // aws-s3-bucket-insecure-http -export { rule as S6281 } from './S6281/index.js'; // aws-s3-bucket-public-access -export { rule as S6245 } from './S6245/index.js'; // aws-s3-bucket-server-encryption -export { rule as S6252 } from './S6252/index.js'; // aws-s3-bucket-versioning -export { rule as S6319 } from './S6319/index.js'; // aws-sagemaker-unencrypted-notebook -export { rule as S6327 } from './S6327/index.js'; // aws-sns-unencrypted-topics -export { rule as S6330 } from './S6330/index.js'; // aws-sqs-unencrypted-queue -export { rule as S1529 } from './S1529/index.js'; // bitwise-operators -export { rule as S4798 } from './S4798/index.js'; // bool-param-default -export { rule as S1472 } from './S1472/index.js'; // call-argument-line -export { rule as S5742 } from './S5742/index.js'; // certificate-transparency -export { rule as S6092 } from './S6092/index.js'; // chai-determinate-assertion -export { rule as S101 } from './S101/index.js'; // class-name -export { rule as S3525 } from './S3525/index.js'; // class-prototype -export { rule as S1523 } from './S1523/index.js'; // code-eval -export { rule as S3776 } from './S3776/index.js'; // cognitive-complexity -export { rule as S3616 } from './S3616/index.js'; // comma-or-logical-or-case -export { rule as S124 } from './S124/index.js'; // comment-regex -export { rule as S6353 } from './S6353/index.js'; // concise-regex -export { rule as S3973 } from './S3973/index.js'; // conditional-indentation -export { rule as S5757 } from './S5757/index.js'; // confidential-information-logging -export { rule as S1848 } from './S1848/index.js'; // constructor-for-side-effects -export { rule as S5693 } from './S5693/index.js'; // content-length -export { rule as S5728 } from './S5728/index.js'; // content-security-policy -export { rule as S3330 } from './S3330/index.js'; // cookie-no-httponly -export { rule as S2255 } from './S2255/index.js'; // cookies -export { rule as S5122 } from './S5122/index.js'; // cors -export { rule as S4502 } from './S4502/index.js'; // csrf -export { rule as S1541 } from './S1541/index.js'; // cyclomatic-complexity -export { rule as S3798 } from './S3798/index.js'; // declarations-in-global-scope -export { rule as S1874 } from './S1874/index.js'; // deprecation -export { rule as S3514 } from './S3514/index.js'; // destructuring-assignment-syntax -export { rule as S3403 } from './S3403/index.js'; // different-types-comparison -export { rule as S5247 } from './S5247/index.js'; // disabled-auto-escaping -export { rule as S5725 } from './S5725/index.js'; // disabled-resource-integrity -export { rule as S6080 } from './S6080/index.js'; // disabled-timeout -export { rule as S5743 } from './S5743/index.js'; // dns-prefetching -export { rule as S5869 } from './S5869/index.js'; // duplicates-in-character-class -export { rule as S126 } from './S126/index.js'; // elseif-without-else -export { rule as S5842 } from './S5842/index.js'; // empty-string-repetition -export { rule as S4787 } from './S4787/index.js'; // encryption -export { rule as S5542 } from './S5542/index.js'; // encryption-secure-mode -export { rule as S3723 } from './S3723/index.js'; // enforce-trailing-comma -export { rule as S6328 } from './S6328/index.js'; // existing-groups -export { rule as S1067 } from './S1067/index.js'; // expression-complexity -export { rule as S1451 } from './S1451/index.js'; // file-header -export { rule as S3317 } from './S3317/index.js'; // file-name-differ-from-class -export { rule as S2612 } from './S2612/index.js'; // file-permissions -export { rule as S2598 } from './S2598/index.js'; // file-uploads -export { rule as S1134 } from './S1134/index.js'; // fixme-tag -export { rule as S1535 } from './S1535/index.js'; // for-in -export { rule as S2251 } from './S2251/index.js'; // for-loop-increment-sign -export { rule as S5732 } from './S5732/index.js'; // frame-ancestors -export { rule as S1515 } from './S1515/index.js'; // function-inside-loop -export { rule as S100 } from './S100/index.js'; // function-name -export { rule as S3800 } from './S3800/index.js'; // function-return-type -export { rule as S1527 } from './S1527/index.js'; // future-reserved-words -export { rule as S3531 } from './S3531/index.js'; // generator-without-yield -export { rule as S4790 } from './S4790/index.js'; // hashing -export { rule as S5691 } from './S5691/index.js'; // hidden-files -export { rule as S6754 } from './S6754/index.js'; // hook-use-state -export { rule as S3785 } from './S3785/index.js'; // in-operator-type-error -export { rule as S3686 } from './S3686/index.js'; // inconsistent-function-call -export { rule as S2692 } from './S2692/index.js'; // index-of-compare-to-positive-number -export { rule as S2092 } from './S2092/index.js'; // insecure-cookie -export { rule as S5659 } from './S5659/index.js'; // insecure-jwt-token -export { rule as S3415 } from './S3415/index.js'; // inverted-assertion-arguments -export { rule as S6477 } from './S6477/index.js'; // jsx-key -export { rule as S6481 } from './S6481/index.js'; // jsx-no-constructed-context-values -export { rule as S1439 } from './S1439/index.js'; // label-position -export { rule as S5148 } from './S5148/index.js'; // link-with-target-blank -export { rule as S1479 } from './S1479/index.js'; // max-switch-cases -export { rule as S4622 } from './S4622/index.js'; // max-union-size -export { rule as S1994 } from './S1994/index.js'; // misplaced-loop-counter -export { rule as S1082 } from './S1082/index.js'; // mouse-events-a11y -export { rule as S134 } from './S134/index.js'; // nested-control-flow -export { rule as S2999 } from './S2999/index.js'; // new-operator-misuse -export { rule as S3923 } from './S3923/index.js'; // no-all-duplicated-branches -export { rule as S2871 } from './S2871/index.js'; // no-alphabetical-sort -export { rule as S6268 } from './S6268/index.js'; // no-angular-bypass-sanitization -export { rule as S2870 } from './S2870/index.js'; // no-array-delete -export { rule as S6479 } from './S6479/index.js'; // no-array-index-key -export { rule as S3579 } from './S3579/index.js'; // no-associative-arrays -export { rule as S7059 } from './S7059/index.js'; // no-async-constructor -export { rule as S2424 } from './S2424/index.js'; // no-built-in-override -export { rule as S1219 } from './S1219/index.js'; // no-case-label-in-switch -export { rule as S5332 } from './S5332/index.js'; // no-clear-text-protocols -export { rule as S6079 } from './S6079/index.js'; // no-code-after-done -export { rule as S1066 } from './S1066/index.js'; // no-collapsible-if -export { rule as S3981 } from './S3981/index.js'; // no-collection-size-mischeck -export { rule as S125 } from './S125/index.js'; // no-commented-code -export { rule as S1854 } from './S1854/index.js'; // no-dead-store -export { rule as S3001 } from './S3001/index.js'; // no-delete-var -export { rule as S6957 } from './S6957/index.js'; // no-deprecated-react -export { rule as S4621 } from './S4621/index.js'; // no-duplicate-in-composite -export { rule as S1192 } from './S1192/index.js'; // no-duplicate-string -export { rule as S1871 } from './S1871/index.js'; // no-duplicated-branches -export { rule as S4143 } from './S4143/index.js'; // no-element-overwrite -export { rule as S6019 } from './S6019/index.js'; // no-empty-after-reluctant -export { rule as S6323 } from './S6323/index.js'; // no-empty-alternatives -export { rule as S4158 } from './S4158/index.js'; // no-empty-collection -export { rule as S6331 } from './S6331/index.js'; // no-empty-group -export { rule as S2187 } from './S2187/index.js'; // no-empty-test-file -export { rule as S888 } from './S888/index.js'; // no-equals-in-for-termination -export { rule as S6426 } from './S6426/index.js'; // no-exclusive-tests -export { rule as S930 } from './S930/index.js'; // no-extra-arguments -export { rule as S4139 } from './S4139/index.js'; // no-for-in-iterable -export { rule as S1530 } from './S1530/index.js'; // no-function-declaration-in-block -export { rule as S2990 } from './S2990/index.js'; // no-global-this -export { rule as S2137 } from './S2137/index.js'; // no-globals-shadowing -export { rule as S2589 } from './S2589/index.js'; // no-gratuitous-expressions -export { rule as S2068 } from './S2068/index.js'; // no-hardcoded-credentials -export { rule as S1313 } from './S1313/index.js'; // no-hardcoded-ip -export { rule as S6442 } from './S6442/index.js'; // no-hook-setter-in-body -export { rule as S1862 } from './S1862/index.js'; // no-identical-conditions -export { rule as S1764 } from './S1764/index.js'; // no-identical-expressions -export { rule as S4144 } from './S4144/index.js'; // no-identical-functions -export { rule as S2486 } from './S2486/index.js'; // no-ignored-exceptions -export { rule as S2201 } from './S2201/index.js'; // no-ignored-return -export { rule as S4328 } from './S4328/index.js'; // no-implicit-dependencies -export { rule as S2703 } from './S2703/index.js'; // no-implicit-global -export { rule as S4619 } from './S4619/index.js'; // no-in-misuse -export { rule as S1940 } from './S1940/index.js'; // no-inverted-boolean-check -export { rule as S2970 } from './S2970/index.js'; // no-incomplete-assertions -export { rule as S3801 } from './S3801/index.js'; // no-inconsistent-returns -export { rule as S3402 } from './S3402/index.js'; // no-incorrect-string-concat -export { rule as S6627 } from './S6627/index.js'; // no-internal-api-use -export { rule as S5604 } from './S5604/index.js'; // no-intrusive-permissions -export { rule as S4123 } from './S4123/index.js'; // no-invalid-await -export { rule as S3516 } from './S3516/index.js'; // no-invariant-returns -export { rule as S5759 } from './S5759/index.js'; // no-ip-forward -export { rule as S1119 } from './S1119/index.js'; // no-labels -export { rule as S6958 } from './S6958/index.js'; // no-literal-call -export { rule as S5734 } from './S5734/index.js'; // no-mime-sniff -export { rule as S4043 } from './S4043/index.js'; // no-misleading-array-reverse -export { rule as S5730 } from './S5730/index.js'; // no-mixed-content -export { rule as S1121 } from './S1121/index.js'; // no-nested-assignment -export { rule as S3358 } from './S3358/index.js'; // no-nested-conditional -export { rule as S2004 } from './S2004/index.js'; // no-nested-functions -export { rule as S1821 } from './S1821/index.js'; // no-nested-switch -export { rule as S4624 } from './S4624/index.js'; // no-nested-template-literals -export { rule as S881 } from './S881/index.js'; // no-nested-incdec -export { rule as S1751 } from './S1751/index.js'; // no-one-iteration-loop -export { rule as S4036 } from './S4036/index.js'; // no-os-command-from-path -export { rule as S1226 } from './S1226/index.js'; // no-parameter-reassignment -export { rule as S1533 } from './S1533/index.js'; // no-primitive-wrappers -export { rule as S4165 } from './S4165/index.js'; // no-redundant-assignments -export { rule as S1125 } from './S1125/index.js'; // no-redundant-boolean -export { rule as S3626 } from './S3626/index.js'; // no-redundant-jump -export { rule as S4782 } from './S4782/index.js'; // no-redundant-optional -export { rule as S1110 } from './S1110/index.js'; // no-redundant-parentheses -export { rule as S3827 } from './S3827/index.js'; // no-reference-error -export { rule as S5736 } from './S5736/index.js'; // no-referrer-policy -export { rule as S3533 } from './S3533/index.js'; // no-require-or-define -export { rule as S4324 } from './S4324/index.js'; // no-return-type-any -export { rule as S5863 } from './S5863/index.js'; // no-same-argument-assert -export { rule as S3972 } from './S3972/index.js'; // no-same-line-conditional -export { rule as S1607 } from './S1607/index.js'; // no-skipped-tests -export { rule as S1301 } from './S1301/index.js'; // no-small-switch -export { rule as S105 } from './S105/index.js'; // no-tab -export { rule as S5257 } from './S5257/index.js'; // no-table-as-layout -export { rule as S4822 } from './S4822/index.js'; // no-try-promise -export { rule as S4623 } from './S4623/index.js'; // no-undefined-argument -export { rule as S2138 } from './S2138/index.js'; // no-undefined-assignment -export { rule as S2681 } from './S2681/index.js'; // no-unenclosed-multiline-block -export { rule as S6486 } from './S6486/index.js'; // no-uniq-key -export { rule as S6791 } from './S6791/index.js'; // no-unsafe -export { rule as S5042 } from './S5042/index.js'; // no-unsafe-unzip -export { rule as S6478 } from './S6478/index.js'; // no-unstable-nested-components -export { rule as S3984 } from './S3984/index.js'; // no-unthrown-error -export { rule as S4030 } from './S4030/index.js'; // no-unused-collection -export { rule as S1172 } from './S1172/index.js'; // no-unused-function-argument -export { rule as S3699 } from './S3699/index.js'; // no-use-of-empty-return-value -export { rule as S2737 } from './S2737/index.js'; // no-useless-catch -export { rule as S2123 } from './S2123/index.js'; // no-useless-increment -export { rule as S4335 } from './S4335/index.js'; // no-useless-intersection -export { rule as S6443 } from './S6443/index.js'; // no-useless-react-setstate -export { rule as S1526 } from './S1526/index.js'; // no-variable-usage-before-declaration -export { rule as S6299 } from './S6299/index.js'; // no-vue-bypass-sanitization -export { rule as S5547 } from './S5547/index.js'; // no-weak-cipher -export { rule as S4426 } from './S4426/index.js'; // no-weak-keys -export { rule as S2208 } from './S2208/index.js'; // no-wildcard-import -export { rule as S2757 } from './S2757/index.js'; // non-existent-operator -export { rule as S3760 } from './S3760/index.js'; // non-number-in-arithmetic-expression -export { rule as S2259 } from './S2259/index.js'; // null-dereference -export { rule as S5264 } from './S5264/index.js'; // object-alt-content -export { rule as S3757 } from './S3757/index.js'; // operation-returning-nan -export { rule as S4721 } from './S4721/index.js'; // os-command -export { rule as S2819 } from './S2819/index.js'; // post-message -export { rule as S4524 } from './S4524/index.js'; // prefer-default-last -export { rule as S1488 } from './S1488/index.js'; // prefer-immediate-return -export { rule as S2428 } from './S2428/index.js'; // prefer-object-literal -export { rule as S4634 } from './S4634/index.js'; // prefer-promise-shorthand -export { rule as S1126 } from './S1126/index.js'; // prefer-single-boolean-return -export { rule as S4322 } from './S4322/index.js'; // prefer-type-guard -export { rule as S1264 } from './S1264/index.js'; // prefer-while -export { rule as S4823 } from './S4823/index.js'; // process-argv -export { rule as S4507 } from './S4507/index.js'; // production-debug -export { rule as S2245 } from './S2245/index.js'; // pseudo-random -export { rule as S1444 } from './S1444/index.js'; // public-static-readonly -export { rule as S5443 } from './S5443/index.js'; // publicly-writable-directories -export { rule as S6959 } from './S6959/index.js'; // reduce-initial-value -export { rule as S6564 } from './S6564/index.js'; // redundant-type-aliases -export { rule as S5843 } from './S5843/index.js'; // regex-complexity -export { rule as S4784 } from './S4784/index.js'; // regular-expr -export { rule as S5876 } from './S5876/index.js'; // session-regeneration -export { rule as S3499 } from './S3499/index.js'; // shorthand-property-grouping -export { rule as S6397 } from './S6397/index.js'; // single-char-in-character-classes -export { rule as S6035 } from './S6035/index.js'; // single-character-alternation -export { rule as S5852 } from './S5852/index.js'; // slow-regex -export { rule as S4818 } from './S4818/index.js'; // sockets -export { rule as S2392 } from './S2392/index.js'; // sonar-block-scoped-var -export { rule as S6439 } from './S6439/index.js'; // sonar-jsx-no-leaked-render -export { rule as S104 } from './S104/index.js'; // sonar-max-lines -export { rule as S138 } from './S138/index.js'; // sonar-max-lines-per-function -export { rule as S6324 } from './S6324/index.js'; // sonar-no-control-regex -export { rule as S2639 } from './S2639/index.js'; // sonar-no-empty-character-class -export { rule as S128 } from './S128/index.js'; // sonar-no-fallthrough -export { rule as S5856 } from './S5856/index.js'; // sonar-no-invalid-regexp -export { rule as S109 } from './S109/index.js'; // sonar-no-magic-numbers -export { rule as S5868 } from './S5868/index.js'; // sonar-no-misleading-character-class -export { rule as S6326 } from './S6326/index.js'; // sonar-no-regex-spaces -export { rule as S6441 } from './S6441/index.js'; // sonar-no-unused-class-component-methods -export { rule as S1481 } from './S1481/index.js'; // sonar-no-unused-vars -export { rule as S6582 } from './S6582/index.js'; // sonar-prefer-optional-chain -export { rule as S6759 } from './S6759/index.js'; // sonar-prefer-read-only-props -export { rule as S6594 } from './S6594/index.js'; // sonar-prefer-regexp-exec -export { rule as S2077 } from './S2077/index.js'; // sql-queries -export { rule as S5973 } from './S5973/index.js'; // stable-tests -export { rule as S4829 } from './S4829/index.js'; // standard-input -export { rule as S6351 } from './S6351/index.js'; // stateful-regex -export { rule as S5739 } from './S5739/index.js'; // strict-transport-security -export { rule as S3003 } from './S3003/index.js'; // strings-comparison -export { rule as S3854 } from './S3854/index.js'; // super-invocation -export { rule as S5256 } from './S5256/index.js'; // table-header -export { rule as S5260 } from './S5260/index.js'; // table-header-reference -export { rule as S5958 } from './S5958/index.js'; // test-check-exception -export { rule as S1135 } from './S1135/index.js'; // todo-tag -export { rule as S135 } from './S135/index.js'; // too-many-break-or-continue-in-loop -export { rule as S5867 } from './S5867/index.js'; // unicode-aware-regex -export { rule as S1128 } from './S1128/index.js'; // unused-import -export { rule as S5860 } from './S5860/index.js'; // unused-named-groups -export { rule as S4830 } from './S4830/index.js'; // unverified-certificate -export { rule as S5527 } from './S5527/index.js'; // unverified-hostname -export { rule as S3500 } from './S3500/index.js'; // updated-const-var -export { rule as S2310 } from './S2310/index.js'; // updated-loop-counter -export { rule as S4323 } from './S4323/index.js'; // use-type-alias -export { rule as S1154 } from './S1154/index.js'; // useless-string-operation -export { rule as S3758 } from './S3758/index.js'; // values-not-convertible-to-numbers -export { rule as S117 } from './S117/index.js'; // variable-name -export { rule as S3735 } from './S3735/index.js'; // void-use -export { rule as S4423 } from './S4423/index.js'; // weak-ssl -export { rule as S2817 } from './S2817/index.js'; // web-sql-database -export { rule as S5689 } from './S5689/index.js'; // x-powered-by -export { rule as S2755 } from './S2755/index.js'; // xml-parser-xxe -export { rule as S4817 } from './S4817/index.js'; // xpath -export { rule as S2301 } from './S2301/index.js'; diff --git a/packages/jsts/src/rules/plugin.ts b/packages/jsts/src/rules/plugin.ts index c037ade8004..c95090a4c0e 100644 --- a/packages/jsts/src/rules/plugin.ts +++ b/packages/jsts/src/rules/plugin.ts @@ -22,342 +22,9 @@ * This is the entry point of the ESLint Plugin. * Said differently, this is the public API of the ESLint Plugin. */ -import type { Rule, Linter } from 'eslint'; +import type { Linter } from 'eslint'; -import * as originalRules from './original.js'; -import * as decoratedRules from './decorated.js'; - -export const rules: Record = { - 'anchor-precedence': originalRules.S5850, - 'argument-type': originalRules.S3782, - 'arguments-order': originalRules.S2234, - 'arguments-usage': originalRules.S3513, - 'array-callback-without-return': originalRules.S3796, - 'array-constructor': originalRules.S1528, - 'arrow-function-convention': originalRules.S3524, - 'assertions-in-tests': originalRules.S2699, - 'aws-apigateway-public-api': originalRules.S6333, - 'aws-ec2-rds-dms-public': originalRules.S6329, - 'aws-ec2-unencrypted-ebs-volume': originalRules.S6275, - 'aws-efs-unencrypted': originalRules.S6332, - 'aws-iam-all-privileges': originalRules.S6302, - 'aws-iam-all-resources-accessible': originalRules.S6304, - 'aws-iam-privilege-escalation': originalRules.S6317, - 'aws-iam-public-access': originalRules.S6270, - 'aws-opensearchservice-domain': originalRules.S6308, - 'aws-rds-unencrypted-databases': originalRules.S6303, - 'aws-restricted-ip-admin-access': originalRules.S6321, - 'aws-s3-bucket-granted-access': originalRules.S6265, - 'aws-s3-bucket-insecure-http': originalRules.S6249, - 'aws-s3-bucket-public-access': originalRules.S6281, - 'aws-s3-bucket-server-encryption': originalRules.S6245, - 'aws-s3-bucket-versioning': originalRules.S6252, - 'aws-sagemaker-unencrypted-notebook': originalRules.S6319, - 'aws-sns-unencrypted-topics': originalRules.S6327, - 'aws-sqs-unencrypted-queue': originalRules.S6330, - 'bitwise-operators': originalRules.S1529, - 'bool-param-default': originalRules.S4798, - 'call-argument-line': originalRules.S1472, - 'certificate-transparency': originalRules.S5742, - 'chai-determinate-assertion': originalRules.S6092, - 'class-name': originalRules.S101, - 'class-prototype': originalRules.S3525, - 'code-eval': originalRules.S1523, - 'cognitive-complexity': originalRules.S3776, - 'comma-or-logical-or-case': originalRules.S3616, - 'comment-regex': originalRules.S124, - 'concise-regex': originalRules.S6353, - 'conditional-indentation': originalRules.S3973, - 'confidential-information-logging': originalRules.S5757, - 'constructor-for-side-effects': originalRules.S1848, - 'content-length': originalRules.S5693, - 'content-security-policy': originalRules.S5728, - 'cookie-no-httponly': originalRules.S3330, - cookies: originalRules.S2255, - cors: originalRules.S5122, - csrf: originalRules.S4502, - 'cyclomatic-complexity': originalRules.S1541, - 'declarations-in-global-scope': originalRules.S3798, - deprecation: originalRules.S1874, - 'destructuring-assignment-syntax': originalRules.S3514, - 'different-types-comparison': originalRules.S3403, - 'disabled-auto-escaping': originalRules.S5247, - 'disabled-resource-integrity': originalRules.S5725, - 'disabled-timeout': originalRules.S6080, - 'dns-prefetching': originalRules.S5743, - 'duplicates-in-character-class': originalRules.S5869, - 'elseif-without-else': originalRules.S126, - 'empty-string-repetition': originalRules.S5842, - encryption: originalRules.S4787, - 'encryption-secure-mode': originalRules.S5542, - 'enforce-trailing-comma': originalRules.S3723, - 'existing-groups': originalRules.S6328, - 'expression-complexity': originalRules.S1067, - 'file-header': originalRules.S1451, - 'file-name-differ-from-class': originalRules.S3317, - 'file-permissions': originalRules.S2612, - 'file-uploads': originalRules.S2598, - 'fixme-tag': originalRules.S1134, - 'for-in': originalRules.S1535, - 'for-loop-increment-sign': originalRules.S2251, - 'frame-ancestors': originalRules.S5732, - 'function-inside-loop': originalRules.S1515, - 'function-name': originalRules.S100, - 'function-return-type': originalRules.S3800, - 'future-reserved-words': originalRules.S1527, - 'generator-without-yield': originalRules.S3531, - hashing: originalRules.S4790, - 'hidden-files': originalRules.S5691, - 'hook-use-state': originalRules.S6754, - 'in-operator-type-error': originalRules.S3785, - 'inconsistent-function-call': originalRules.S3686, - 'index-of-compare-to-positive-number': originalRules.S2692, - 'insecure-cookie': originalRules.S2092, - 'insecure-jwt-token': originalRules.S5659, - 'inverted-assertion-arguments': originalRules.S3415, - 'jsx-key': originalRules.S6477, - 'jsx-no-constructed-context-values': originalRules.S6481, - 'label-position': originalRules.S1439, - 'link-with-target-blank': originalRules.S5148, - 'max-switch-cases': originalRules.S1479, - 'max-union-size': originalRules.S4622, - 'misplaced-loop-counter': originalRules.S1994, - 'mouse-events-a11y': originalRules.S1082, - 'nested-control-flow': originalRules.S134, - 'new-operator-misuse': originalRules.S2999, - 'no-all-duplicated-branches': originalRules.S3923, - 'no-alphabetical-sort': originalRules.S2871, - 'no-angular-bypass-sanitization': originalRules.S6268, - 'no-array-delete': originalRules.S2870, - 'no-array-index-key': originalRules.S6479, - 'no-associative-arrays': originalRules.S3579, - 'no-async-constructor': originalRules.S7059, - 'no-built-in-override': originalRules.S2424, - 'no-case-label-in-switch': originalRules.S1219, - 'no-clear-text-protocols': originalRules.S5332, - 'no-code-after-done': originalRules.S6079, - 'no-collapsible-if': originalRules.S1066, - 'no-collection-size-mischeck': originalRules.S3981, - 'no-commented-code': originalRules.S125, - 'no-dead-store': originalRules.S1854, - 'no-delete-var': originalRules.S3001, - 'no-deprecated-react': originalRules.S6957, - 'no-duplicate-in-composite': originalRules.S4621, - 'no-duplicate-string': originalRules.S1192, - 'no-duplicated-branches': originalRules.S1871, - 'no-element-overwrite': originalRules.S4143, - 'no-empty-after-reluctant': originalRules.S6019, - 'no-empty-alternatives': originalRules.S6323, - 'no-empty-collection': originalRules.S4158, - 'no-empty-group': originalRules.S6331, - 'no-empty-test-file': originalRules.S2187, - 'no-equals-in-for-termination': originalRules.S888, - 'no-exclusive-tests': originalRules.S6426, - 'no-extra-arguments': originalRules.S930, - 'no-for-in-iterable': originalRules.S4139, - 'no-function-declaration-in-block': originalRules.S1530, - 'no-global-this': originalRules.S2990, - 'no-globals-shadowing': originalRules.S2137, - 'no-gratuitous-expressions': originalRules.S2589, - 'no-hardcoded-credentials': originalRules.S2068, - 'no-hardcoded-ip': originalRules.S1313, - 'no-hook-setter-in-body': originalRules.S6442, - 'no-identical-conditions': originalRules.S1862, - 'no-identical-expressions': originalRules.S1764, - 'no-identical-functions': originalRules.S4144, - 'no-ignored-exceptions': originalRules.S2486, - 'no-ignored-return': originalRules.S2201, - 'no-implicit-dependencies': originalRules.S4328, - 'no-implicit-global': originalRules.S2703, - 'no-in-misuse': originalRules.S4619, - 'no-incomplete-assertions': originalRules.S2970, - 'no-inconsistent-returns': originalRules.S3801, - 'no-incorrect-string-concat': originalRules.S3402, - 'no-internal-api-use': originalRules.S6627, - 'no-intrusive-permissions': originalRules.S5604, - 'no-invalid-await': originalRules.S4123, - 'no-invariant-returns': originalRules.S3516, - 'no-inverted-boolean-check': originalRules.S1940, - 'no-ip-forward': originalRules.S5759, - 'no-labels': originalRules.S1119, - 'no-literal-call': originalRules.S6958, - 'no-mime-sniff': originalRules.S5734, - 'no-misleading-array-reverse': originalRules.S4043, - 'no-mixed-content': originalRules.S5730, - 'no-nested-assignment': originalRules.S1121, - 'no-nested-conditional': originalRules.S3358, - 'no-nested-functions': originalRules.S2004, - 'no-nested-incdec': originalRules.S881, - 'no-nested-switch': originalRules.S1821, - 'no-nested-template-literals': originalRules.S4624, - 'no-one-iteration-loop': originalRules.S1751, - 'no-os-command-from-path': originalRules.S4036, - 'no-parameter-reassignment': originalRules.S1226, - 'no-primitive-wrappers': originalRules.S1533, - 'no-redundant-assignments': originalRules.S4165, - 'no-redundant-boolean': originalRules.S1125, - 'no-redundant-jump': originalRules.S3626, - 'no-redundant-optional': originalRules.S4782, - 'no-redundant-parentheses': originalRules.S1110, - 'no-reference-error': originalRules.S3827, - 'no-referrer-policy': originalRules.S5736, - 'no-require-or-define': originalRules.S3533, - 'no-return-type-any': originalRules.S4324, - 'no-same-argument-assert': originalRules.S5863, - 'no-same-line-conditional': originalRules.S3972, - 'no-selector-parameter': originalRules.S2301, - 'no-skipped-test': originalRules.S1607, - 'no-small-switch': originalRules.S1301, - 'no-tab': originalRules.S105, - 'no-table-as-layout': originalRules.S5257, - 'no-try-promise': originalRules.S4822, - 'no-undefined-argument': originalRules.S4623, - 'no-undefined-assignment': originalRules.S2138, - 'no-unenclosed-multiline-block': originalRules.S2681, - 'no-uniq-key': originalRules.S6486, - 'no-unsafe': originalRules.S6791, - 'no-unsafe-unzip': originalRules.S5042, - 'no-unstable-nested-components': originalRules.S6478, - 'no-unthrown-error': originalRules.S3984, - 'no-unused-collection': originalRules.S4030, - 'no-unused-function-argument': originalRules.S1172, - 'no-use-of-empty-return-value': originalRules.S3699, - 'no-useless-catch': originalRules.S2737, - 'no-useless-increment': originalRules.S2123, - 'no-useless-intersection': originalRules.S4335, - 'no-useless-react-setstate': originalRules.S6443, - 'no-variable-usage-before-declaration': originalRules.S1526, - 'no-vue-bypass-sanitization': originalRules.S6299, - 'no-weak-cipher': originalRules.S5547, - 'no-weak-keys': originalRules.S4426, - 'no-wildcard-import': originalRules.S2208, - 'non-existent-operator': originalRules.S2757, - 'non-number-in-arithmetic-expression': originalRules.S3760, - 'null-dereference': originalRules.S2259, - 'object-alt-content': originalRules.S5264, - 'operation-returning-nan': originalRules.S3757, - 'os-command': originalRules.S4721, - 'post-message': originalRules.S2819, - 'prefer-default-last': originalRules.S4524, - 'prefer-immediate-return': originalRules.S1488, - 'prefer-object-literal': originalRules.S2428, - 'prefer-promise-shorthand': originalRules.S4634, - 'prefer-single-boolean-return': originalRules.S1126, - 'prefer-type-guard': originalRules.S4322, - 'prefer-while': originalRules.S1264, - 'process-argv': originalRules.S4823, - 'production-debug': originalRules.S4507, - 'pseudo-random': originalRules.S2245, - 'public-static-readonly': originalRules.S1444, - 'publicly-writable-directories': originalRules.S5443, - 'reduce-initial-value': originalRules.S6959, - 'redundant-type-aliases': originalRules.S6564, - 'regex-complexity': originalRules.S5843, - 'regular-expr': originalRules.S4784, - 'session-regeneration': originalRules.S5876, - 'shorthand-property-grouping': originalRules.S3499, - 'single-char-in-character-classes': originalRules.S6397, - 'single-character-alternation': originalRules.S6035, - 'slow-regex': originalRules.S5852, - sockets: originalRules.S4818, - 'sonar-block-scoped-var': originalRules.S2392, - 'sonar-jsx-no-leaked-render': originalRules.S6439, - 'sonar-max-lines': originalRules.S104, - 'sonar-max-lines-per-function': originalRules.S138, - 'sonar-no-control-regex': originalRules.S6324, - 'sonar-no-empty-character-class': originalRules.S2639, - 'sonar-no-fallthrough': originalRules.S128, - 'sonar-no-invalid-regexp': originalRules.S5856, - 'sonar-no-magic-numbers': originalRules.S109, - 'sonar-no-misleading-character-class': originalRules.S5868, - 'sonar-no-regex-spaces': originalRules.S6326, - 'sonar-no-unused-class-component-methods': originalRules.S6441, - 'sonar-no-unused-vars': originalRules.S1481, - 'sonar-prefer-optional-chain': originalRules.S6582, - 'sonar-prefer-read-only-props': originalRules.S6759, - 'sonar-prefer-regexp-exec': originalRules.S6594, - 'sql-queries': originalRules.S2077, - 'stable-tests': originalRules.S5973, - 'standard-input': originalRules.S4829, - 'stateful-regex': originalRules.S6351, - 'strict-transport-security': originalRules.S5739, - 'strings-comparison': originalRules.S3003, - 'super-invocation': originalRules.S3854, - 'table-header': originalRules.S5256, - 'table-header-reference': originalRules.S5260, - 'test-check-exception': originalRules.S5958, - 'todo-tag': originalRules.S1135, - 'too-many-break-or-continue-in-loop': originalRules.S135, - 'unicode-aware-regex': originalRules.S5867, - 'unused-import': originalRules.S1128, - 'unused-named-groups': originalRules.S5860, - 'unverified-certificate': originalRules.S4830, - 'unverified-hostname': originalRules.S5527, - 'updated-const-var': originalRules.S3500, - 'updated-loop-counter': originalRules.S2310, - 'use-type-alias': originalRules.S4323, - 'useless-string-operation': originalRules.S1154, - 'values-not-convertible-to-numbers': originalRules.S3758, - 'variable-name': originalRules.S117, - 'void-use': originalRules.S3735, - 'weak-ssl': originalRules.S4423, - 'web-sql-database': originalRules.S2817, - 'x-powered-by': originalRules.S5689, - 'xml-parser-xxe': originalRules.S2755, - xpath: originalRules.S4817, - - 'sonar-max-params': decoratedRules.S107, - 'no-unused-private-class-members': decoratedRules.S1068, - 'alt-text': decoratedRules.S1077, - 'brace-style': decoratedRules.S1105, - 'no-extra-semi': decoratedRules.S1116, - 'no-empty-function': decoratedRules.S1186, - 'switch-without-default': decoratedRules.S131, - semi: decoratedRules.S1438, - 'sonar-no-dupe-keys': decoratedRules.S1534, - 'no-unreachable': decoratedRules.S1763, - 'default-param-last': decoratedRules.S1788, - 'no-infinite-loop': decoratedRules.S2189, - 'accessor-pairs': decoratedRules.S2376, - 'new-cap': decoratedRules.S2430, - 'use-isnan': decoratedRules.S2688, - 'no-redeclare': decoratedRules.S2814, - 'object-shorthand': decoratedRules.S3498, - 'no-var': decoratedRules.S3504, - 'prefer-template': decoratedRules.S3512, - 'no-throw-literal': decoratedRules.S3696, - 'no-empty-interface': decoratedRules.S4023, - 'media-has-caption': decoratedRules.S4084, - 'prefer-for-of': decoratedRules.S4138, - 'prefer-namespace-keyword': decoratedRules.S4156, - 'no-accessor-field-mismatch': decoratedRules.S4275, - 'no-this-alias': decoratedRules.S4327, - 'html-has-lang': decoratedRules.S5254, - 'unnecessary-character-escapes': decoratedRules.S6535, - 'no-misused-promises': decoratedRules.S6544, - 'no-base-to-string': decoratedRules.S6551, - 'prefer-string-starts-ends-with': decoratedRules.S6557, - 'no-redundant-type-constituents': decoratedRules.S6571, - 'prefer-enum-initializers': decoratedRules.S6572, - 'prefer-function-type': decoratedRules.S6598, - 'prefer-nullish-coalescing': decoratedRules.S6606, - 'no-extend-native': decoratedRules.S6643, - 'no-useless-constructor': decoratedRules.S6647, - 'no-lonely-if': decoratedRules.S6660, - 'prefer-object-spread': decoratedRules.S6661, - 'prefer-spread': decoratedRules.S6666, - 'no-useless-call': decoratedRules.S6676, - 'no-self-compare': decoratedRules.S6679, - 'no-unknown-property': decoratedRules.S6747, - 'jsx-no-useless-fragment': decoratedRules.S6749, - 'no-find-dom-node': decoratedRules.S6788, - 'anchor-has-content': decoratedRules.S6827, - 'anchor-is-valid': decoratedRules.S6844, - 'label-has-associated-control': decoratedRules.S6853, - 'no-self-import': decoratedRules.S7060, - 'no-unused-expressions': decoratedRules.S905, - 'rules-of-hooks': decoratedRules.S6440, -}; +import { rules } from './plugin-rules.js'; const recommendedLegacyConfig: Linter.Config = { plugins: ['sonarjs'], rules: {} }; const recommendedConfig: Linter.FlatConfig & { @@ -399,4 +66,6 @@ export const meta = { version: '0.0.0-SNAPSHOT', }; +export { rules }; + export default { rules, configs, meta }; diff --git a/packages/jsts/src/rules/typescript-eslint/index.ts b/packages/jsts/src/rules/typescript-eslint/index.ts index 35b5163d933..f187c676b6a 100644 --- a/packages/jsts/src/rules/typescript-eslint/index.ts +++ b/packages/jsts/src/rules/typescript-eslint/index.ts @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import type { Rule } from 'eslint'; -import pkg from '@typescript-eslint/eslint-plugin'; -const { rules } = pkg; +import { rules as tsEslintRules } from '@typescript-eslint/eslint-plugin'; import { sanitize } from './sanitize.js'; /** @@ -27,11 +26,11 @@ import { sanitize } from './sanitize.js'; * they unconditionally assume that TypeScript's type checker is available. */ const sanitized: Record = {}; -for (const ruleKey of Object.keys(rules)) { - sanitized[ruleKey] = sanitize(rules[ruleKey] as unknown as Rule.RuleModule); +for (const ruleKey of Object.keys(tsEslintRules)) { + sanitized[ruleKey] = sanitize(tsEslintRules[ruleKey] as unknown as Rule.RuleModule); } /** * TypeScript ESLint rules. */ -export const tsEslintRules = sanitized; +export const rules = sanitized; diff --git a/packages/jsts/tests/linter/issues/message.test.ts b/packages/jsts/tests/linter/issues/message.test.ts index 7934fc609e4..a2463bae2da 100644 --- a/packages/jsts/tests/linter/issues/message.test.ts +++ b/packages/jsts/tests/linter/issues/message.test.ts @@ -21,7 +21,7 @@ import { Linter, SourceCode } from 'eslint'; import { convertMessage } from '../../../src/linter/issues/message.js'; import path from 'path'; import { parseJavaScriptSourceFile } from '../../tools/index.js'; -import { S1116 } from '../../../src/rules/decorated.js'; +import { rule as S1116 } from '../../../src/rules/S1116/index.js'; import { describe, it, Mock, mock } from 'node:test'; import { expect } from 'expect'; diff --git a/tools/generate-meta.ts b/tools/generate-meta.ts index b86eda00909..979c3b22bb2 100644 --- a/tools/generate-meta.ts +++ b/tools/generate-meta.ts @@ -28,6 +28,26 @@ function toUnixPath(path: string) { return path.replace(/[\\/]+/g, '/'); } +const header = `/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */`; + const typeMatrix = { CODE_SMELL: 'suggestion', BUG: 'problem', @@ -83,27 +103,8 @@ function generateMetaForRule(ruleDir: string, ruleId: string) { } catch {} writeFileSync( - join(ruleDir, ruleId, 'meta.ts'), - `/* - * SonarQube JavaScript Plugin - * Copyright (C) 2011-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - + join(ruleDir, ruleId, 'generated-meta.ts'), + `${header} // DO NOT EDIT! This file is autogenerated by "npm run generate-meta" @@ -127,7 +128,6 @@ function generateMetaForRules(ruleDir: string) { continue; } if (file.isDirectory()) { - const filename = join(ruleDir, file.name); generateMetaForRule(ruleDir, file.name); } } diff --git a/tools/generate-rule-indexes.ts b/tools/generate-rule-indexes.ts new file mode 100644 index 00000000000..8c3d3efee14 --- /dev/null +++ b/tools/generate-rule-indexes.ts @@ -0,0 +1,88 @@ +/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public 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 { readdir, writeFile } from 'fs/promises'; +import { join } from 'node:path/posix'; +import { pathToFileURL } from 'node:url'; + +function toUnixPath(path: string) { + return path.replace(/[\\/]+/g, '/'); +} + +const header = `/* + * SonarQube JavaScript Plugin + * Copyright (C) 2011-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */`; + +const RULES_FOLDER = join(toUnixPath(import.meta.dirname), '../packages/jsts/src/rules/'); +const ruleRegex = /^S\d+$/; + +const allRules: string[] = []; +const pluginRules: string[] = []; +const eslintIds: Record = {}; + +const files = await readdir(RULES_FOLDER, { withFileTypes: true }); +for (const file of files) { + if (ruleRegex.test(file.name) && file.isDirectory()) { + const metadata = await import( + pathToFileURL(join(RULES_FOLDER, file.name, 'meta.js')).toString() + ); + eslintIds[metadata.sonarKey] = metadata.eslintId; + allRules.push(metadata.sonarKey); + if (metadata.implementation === 'original') { + pluginRules.push(metadata.sonarKey); + } + } +} + +const sonarKeySorter = (a, b) => (parseInt(a.substring(1)) < parseInt(b.substring(1)) ? -1 : 1); + +await writeFile( + join(RULES_FOLDER, './rules.ts'), + `${header}\n\n// DO NOT EDIT! This file was generated by generate-rule-indexes.ts\n${allRules + .sort(sonarKeySorter) + .map(id => `export { rule as ${id} } from './${id}/index.js'; // ${eslintIds[id]} \n`) + .join('')}`, +); + +//sort once; +pluginRules.sort(sonarKeySorter); + +await writeFile( + join(RULES_FOLDER, './plugin-rules.ts'), + `${header}\n\n// DO NOT EDIT! This file was generated by generate-rule-indexes.ts\n +${pluginRules.map(id => `import { rule as ${id} } from './${id}/index.js';\n`).join('')} +export const rules = {${pluginRules.map(id => ` "${eslintIds[id]}": ${id},\n`).join('')}};\n`, +); diff --git a/tools/tsconfig.json b/tools/tsconfig.json index e66e8d31a37..50b3a465903 100644 --- a/tools/tsconfig.json +++ b/tools/tsconfig.json @@ -1,9 +1,10 @@ { "compilerOptions": { - "module": "NodeNext", - "target": "es6", + "module": "nodenext", + "target": "ES2023", "allowJs": true, - "moduleResolution": "NodeNext" + "moduleResolution": "NodeNext", + "typeRoots": ["../node_modules/@types", "../typings"] }, - "files": ["generate-meta.ts"] + "files": ["*.ts"] }