Skip to content

Commit

Permalink
fix(eslint): adjusts to eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Aug 26, 2024
1 parent e5fc8ab commit 1eab921
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
1 change: 0 additions & 1 deletion commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line no-undef
module.exports = {
extends: ['@commitlint/config-conventional'],
};
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion workspaces/adapter/src/testing/test-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class TestAdapter<LogType extends Logger = Logger, SpyType = any> impleme

async progress<ReturnType>(
fn: (progress: { step: (prefix: string, message: string, ...args: any[]) => void }) => ReturnType,
// eslint-disable-next-line @typescript-eslint/no-unused-vars

_options?: { disabled?: boolean | undefined; name?: string | undefined } | undefined,
): Promise<void | ReturnType> {
return fn({ step() {} });
Expand Down
13 changes: 12 additions & 1 deletion workspaces/eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,27 @@ export default [
reportUnusedDisableDirectives: 'error',
},
},
{
files: ['*.cjs'],
languageOptions: {
globals: {
...globals.es2022,
...globals.node,
},
sourceType: 'commonjs',
},
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{ ignores: ['**/dist/**', '**/fixtures/**'] },
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-await-in-loop': 'off',
'sort-imports': ['error', { ignoreDeclarationSort: true }],
'prefer-destructuring': 'error',
'prefer-template': 'error',
'sort-imports': ['error', { ignoreDeclarationSort: true }],
},
},
prettier,
Expand Down
1 change: 1 addition & 0 deletions workspaces/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"peerDependencies": {
"@eslint/js": "^9.9.1",
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",
"globals": "^15.9.0",
"typescript-eslint": "^8.2.0"
},
Expand Down

0 comments on commit 1eab921

Please sign in to comment.