Skip to content

Commit

Permalink
feat(config): implement svelte config
Browse files Browse the repository at this point in the history
  • Loading branch information
nostrorom committed Dec 3, 2024
1 parent 3738f37 commit ff432b0
Show file tree
Hide file tree
Showing 30 changed files with 61 additions and 0 deletions.
32 changes: 32 additions & 0 deletions lib/configs/svelte.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// YOU CAN REGENERATE IT USING pnpm run generate:configs

export = {
plugins: ['testing-library'],
rules: {
'testing-library/await-async-events': [
'error',
{ eventModule: ['fireEvent', 'userEvent'] },
],
'testing-library/await-async-queries': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-queries': 'error',
'testing-library/no-container': 'error',
'testing-library/no-debugging-utils': 'warn',
'testing-library/no-dom-import': ['error', 'svelte'],
'testing-library/no-global-regexp-flag-in-query': 'error',
'testing-library/no-manual-cleanup': 'error',
'testing-library/no-node-access': 'error',
'testing-library/no-promise-in-fire-event': 'error',
'testing-library/no-render-in-lifecycle': 'error',
'testing-library/no-wait-for-multiple-assertions': 'error',
'testing-library/no-wait-for-side-effects': 'error',
'testing-library/no-wait-for-snapshot': 'error',
'testing-library/prefer-find-by': 'error',
'testing-library/prefer-presence-queries': 'error',
'testing-library/prefer-query-by-disappearance': 'error',
'testing-library/prefer-screen-queries': 'error',
'testing-library/render-result-naming-convention': 'error',
},
};
1 change: 1 addition & 0 deletions lib/rules/await-async-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: ['error', { eventModule: 'userEvent' }],
react: ['error', { eventModule: 'userEvent' }],
vue: ['error', { eventModule: ['fireEvent', 'userEvent'] }],
svelte: ['error', { eventModule: ['fireEvent', 'userEvent'] }],
marko: ['error', { eventModule: ['fireEvent', 'userEvent'] }],
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/await-async-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/await-async-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/consistent-data-testid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: false,
react: false,
vue: false,
svelte: false,
marko: false,
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-await-sync-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: ['error', { eventModules: DEFAULT_EVENT_MODULES }],
react: ['error', { eventModules: DEFAULT_EVENT_MODULES }],
vue: false,
svelte: false,
marko: false,
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-await-sync-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-debugging-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'warn',
react: 'warn',
vue: 'warn',
svelte: 'warn',
marko: 'warn',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-dom-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: ['error', 'angular'],
react: ['error', 'react'],
vue: ['error', 'vue'],
svelte: ['error', 'svelte'],
marko: ['error', 'marko'],
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-global-regexp-flag-in-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-manual-cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: false,
react: 'error',
vue: 'error',
svelte: 'error',
marko: false,
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-node-access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-promise-in-fire-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-render-in-lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-unnecessary-act.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: false,
react: 'error',
vue: false,
svelte: false,
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-wait-for-multiple-assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-wait-for-side-effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-wait-for-snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/prefer-explicit-assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: false,
react: false,
vue: false,
svelte: false,
marko: false,
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/prefer-find-by.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/prefer-implicit-assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: false,
react: false,
vue: false,
svelte: false,
marko: false,
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/prefer-presence-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/prefer-query-by-disappearance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/prefer-query-matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: false,
react: false,
vue: false,
svelte: false,
marko: false,
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/prefer-screen-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/prefer-user-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: false,
react: false,
vue: false,
svelte: false,
marko: false,
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/rules/render-result-naming-convention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: 'error',
react: 'error',
vue: 'error',
svelte: 'error',
marko: 'error',
},
},
Expand Down
1 change: 1 addition & 0 deletions lib/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const SUPPORTED_TESTING_FRAMEWORKS = [
'angular',
'react',
'vue',
'svelte',
'marko',
] as const;
export type SupportedTestingFramework =
Expand Down
1 change: 1 addition & 0 deletions tests/fake-rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default createTestingLibraryRule<Options, MessageIds>({
angular: false,
react: false,
vue: false,
svelte: false,
marko: false,
},
},
Expand Down

0 comments on commit ff432b0

Please sign in to comment.