Skip to content

Commit 38cdca1

Browse files
authored
Looping freshness (#246)
1 parent 0a83f20 commit 38cdca1

14 files changed

+958
-1768
lines changed

async-iterators/.eslintrc.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

async-iterators/.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dist/
2+
node_modules/
3+
coverage/
4+
*.log
5+
*.lock
6+
package-lock.json
7+
yarn.lock

async-iterators/.prettierrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"bracketSpacing": true,
9+
"arrowParens": "avoid"
10+
}

async-iterators/eslint.config.js

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import js from '@eslint/js';
2+
import tseslint from '@typescript-eslint/eslint-plugin';
3+
import tsparser from '@typescript-eslint/parser';
4+
import prettier from 'eslint-plugin-prettier';
5+
import prettierConfig from 'eslint-config-prettier';
6+
7+
export default [
8+
// Base JavaScript recommended configuration
9+
js.configs.recommended,
10+
11+
// Configuration for TypeScript files
12+
{
13+
files: ['**/*.ts', '**/*.tsx'],
14+
languageOptions: {
15+
parser: tsparser,
16+
parserOptions: {
17+
ecmaVersion: 'latest',
18+
sourceType: 'module',
19+
project: './tsconfig.json',
20+
},
21+
globals: {
22+
console: 'readonly',
23+
process: 'readonly',
24+
Buffer: 'readonly',
25+
__dirname: 'readonly',
26+
__filename: 'readonly',
27+
global: 'readonly',
28+
setTimeout: 'readonly',
29+
clearTimeout: 'readonly',
30+
setInterval: 'readonly',
31+
clearInterval: 'readonly',
32+
},
33+
},
34+
plugins: {
35+
'@typescript-eslint': tseslint,
36+
prettier: prettier,
37+
},
38+
rules: {
39+
// ESLint recommended
40+
...js.configs.recommended.rules,
41+
42+
// TypeScript ESLint recommended
43+
'@typescript-eslint/no-unused-vars': 'error',
44+
'@typescript-eslint/no-explicit-any': 'off',
45+
'@typescript-eslint/no-unsafe-assignment': 'off',
46+
'@typescript-eslint/no-unsafe-argument': 'off',
47+
'@typescript-eslint/no-unsafe-member-access': 'off',
48+
'@typescript-eslint/unbound-method': 'off',
49+
'@typescript-eslint/no-floating-promises': 'error',
50+
51+
// Prettier
52+
'prettier/prettier': 'error',
53+
54+
// Custom rules
55+
'no-console': 'off',
56+
'no-undef': 'off', // TypeScript handles this
57+
'require-await': 'error',
58+
},
59+
},
60+
61+
// Prettier config (must come last to override conflicting rules)
62+
prettierConfig,
63+
64+
// Global ignores
65+
{
66+
ignores: ['dist/**', 'node_modules/**', 'coverage/**', '*.js'],
67+
},
68+
];

0 commit comments

Comments
 (0)