Skip to content

Commit

Permalink
JS-492 Migrate formatting rules to @Stylistic
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiez authored and kebetsi committed Jan 13, 2025
1 parent cc6fb78 commit 05bf47c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/jsts/src/rules/S1116/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
import { rules as tsEslintRules } from '../external/typescript-eslint/index.js';
import originalRule from '@stylistic/eslint-plugin-ts/rules/no-extra-semi';
import { decorate } from './decorator.js';

export const rule = decorate(tsEslintRules['no-extra-semi']);
export const rule = decorate(originalRule);
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S1116/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ export * from './generated-meta.js';
export const implementation = 'decorated';
export const eslintId = 'no-extra-semi';
export const externalRules = [
{ externalPlugin: 'typescript-eslint', externalRule: 'no-extra-semi' },
{ externalPlugin: '@stylistic/eslint-plugin-ts', externalRule: 'no-extra-semi' },
];
4 changes: 2 additions & 2 deletions packages/jsts/src/rules/S1438/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
import { rules as tsEslintRules } from '../external/typescript-eslint/index.js';
import originalRule from '@stylistic/eslint-plugin-ts/rules/semi';
import { decorate } from './decorator.js';

export const rule = decorate(tsEslintRules['semi']);
export const rule = decorate(originalRule);
4 changes: 3 additions & 1 deletion packages/jsts/src/rules/S1438/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
export * from './generated-meta.js';
export const implementation = 'decorated';
export const eslintId = 'semi';
export const externalRules = [{ externalPlugin: 'typescript-eslint', externalRule: 'semi' }];
export const externalRules = [
{ externalPlugin: '@stylistic/eslint-plugin-ts', externalRule: 'semi' },
];
3 changes: 1 addition & 2 deletions packages/jsts/src/rules/S1537/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
import { rules } from '../external/typescript-eslint/index.js';
export const rule = rules['comma-dangle'];
export { default as rule } from '@stylistic/eslint-plugin-ts/rules/comma-dangle';
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S1537/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
export * from './generated-meta.js';
export const implementation = 'external';
export const eslintId = 'comma-dangle';
export const externalPlugin = 'typescript-eslint';
export const externalPlugin = '@stylistic/eslint-plugin-ts';

0 comments on commit 05bf47c

Please sign in to comment.