Skip to content

Commit

Permalink
ESLINTJS-65 Remove decorated rules from ESLint plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiez committed Nov 25, 2024
1 parent 1e28fce commit a34ca13
Show file tree
Hide file tree
Showing 1,050 changed files with 21,222 additions and 6,102 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions packages/jsts/src/rules/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rules.ts
plugin-rules.ts
50 changes: 50 additions & 0 deletions packages/jsts/src/rules/S100/generated-meta.ts
Original file line number Diff line number Diff line change
@@ -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;
34 changes: 3 additions & 31 deletions packages/jsts/src/rules/S100/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
50 changes: 50 additions & 0 deletions packages/jsts/src/rules/S101/generated-meta.ts
Original file line number Diff line number Diff line change
@@ -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;
34 changes: 3 additions & 31 deletions packages/jsts/src/rules/S101/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
34 changes: 34 additions & 0 deletions packages/jsts/src/rules/S103/generated-meta.ts
Original file line number Diff line number Diff line change
@@ -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';
22 changes: 22 additions & 0 deletions packages/jsts/src/rules/S103/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* SonarQube JavaScript Plugin
* Copyright (C) 2011-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public 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');
22 changes: 22 additions & 0 deletions packages/jsts/src/rules/S103/meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* SonarQube JavaScript Plugin
* Copyright (C) 2011-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public 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';
50 changes: 50 additions & 0 deletions packages/jsts/src/rules/S104/generated-meta.ts
Original file line number Diff line number Diff line change
@@ -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;
34 changes: 3 additions & 31 deletions packages/jsts/src/rules/S104/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Loading

0 comments on commit a34ca13

Please sign in to comment.