Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JS-10] Rename rule S6849 to S5254 #4668

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"file-for-rules:S3812.ts": [
0
],
"file-for-rules:S6551.ts": [
"file-for-rules:S5254.tsx": [
0
],
"file-for-rules:S6583.ts": [
"file-for-rules:S6551.ts": [
0
],
"file-for-rules:S6849.tsx": [
"file-for-rules:S6583.ts": [
0
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"file-for-rules:S5254.tsx": [
2
]
}

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ import path from 'path';

const sonarId = path.basename(__dirname);

describe('Rule S6849', () => {
describe('Rule 5254', () => {
check(sonarId, rule, __dirname);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
// https://sonarsource.github.io/rspec/#/rspec/S6849/javascript
// https://sonarsource.github.io/rspec/#/rspec/S5254/javascript

import { TSESTree } from '@typescript-eslint/utils';
import { Rule } from 'eslint';
Expand Down
4 changes: 2 additions & 2 deletions packages/jsts/src/rules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ import { rule as S3531 } from './S3531'; // generator-without-yield
import { rule as S4790 } from './S4790'; // hashing
import { rule as S5691 } from './S5691'; // hidden-files
import { rule as S6754 } from './S6754'; // hook-use-state
import { rule as S6849 } from './S6849'; // html-has-lang
import { rule as S5254 } from './S5254'; // html-has-lang
import { rule as S3785 } from './S3785'; // in-operator-type-error
import { rule as S3686 } from './S3686'; // inconsistent-function-call
import { rule as S2692 } from './S2692'; // index-of-compare-to-positive-number
Expand Down Expand Up @@ -400,7 +400,7 @@ rules['generator-without-yield'] = S3531;
rules['hashing'] = S4790;
rules['hidden-files'] = S5691;
rules['hook-use-state'] = S6754;
rules['html-has-lang'] = S6849;
rules['html-has-lang'] = S5254;
rules['in-operator-type-error'] = S3785;
rules['inconsistent-function-call'] = S3686;
rules['index-of-compare-to-positive-number'] = S2692;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
import org.sonar.plugins.javascript.api.EslintBasedCheck;
import org.sonar.plugins.javascript.api.JavaScriptRule;
import org.sonar.plugins.javascript.api.TypeScriptRule;
import org.sonarsource.analyzer.commons.annotations.DeprecatedRuleKey;

@TypeScriptRule
@JavaScriptRule
@Rule(key = "S6849")
@DeprecatedRuleKey(ruleKey = "S6849")
@Rule(key = "S5254")
public class HtmlHasLangCheck implements EslintBasedCheck {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"defaultSeverity": "Minor",
"ruleSpecification": "RSPEC-6849",
"sqKey": "S6849",
"sqKey": "S5254",
"scope": "All",
"quickfix": "targeted",
"code": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
"S6846",
"S6847",
"S6848",
"S6849",
"S5254",
"S6850",
"S6851",
"S6852",
Expand Down
Loading