Skip to content

Commit 4050e18

Browse files
committed
🚧 add some TODOs
1 parent 5288a0d commit 4050e18

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

‎eslint-config-cli/base.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ extends:
44
rules:
55
# allow scripts to log simply
66
no-console: 'off'
7+
78
# allow scripts to exit
89
n/no-process-exit: 'off'

‎eslint-config-node/base.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,59 @@ env:
66

77
# plugin:n/recommended-module disables some globals we still want
88
globals:
9+
# TODO: detect if project is type: module or not and remove the globals if so
910
__dirname: 'readonly'
1011
__filename: 'readonly'
1112
require: 'readonly'
1213

1314
rules:
1415
# node has a consistent radix for parseInt
1516
radix: 'off'
17+
1618
# we should be reading any env config into a specific config module
1719
n/no-process-env: 'error'
20+
1821
# enforce return upon a callback
1922
n/callback-return: ['error', ['callback', 'cb', 'next']]
23+
2024
# disallow require() outside of the top-level module scope
2125
n/global-require: 'error'
26+
2227
# enforces error handling in callbacks
2328
n/handle-callback-err: ['error', '^.*[eE]rr(or)?$']
29+
2430
# disallow mixing regular variable and require declarations
2531
n/no-mixed-requires: 'error'
32+
2633
# disallow use of new operator with the require function
2734
n/no-new-require: 'error'
35+
2836
# disallow string concatenation with __dirname and __filename
2937
n/no-path-concat: 'error'
38+
3039
# restrict usage of specified node modules
3140
n/no-restricted-import: 'off'
3241
n/no-restricted-require: 'off'
42+
3343
# disallow use of synchronous methods
3444
n/no-sync: 'error'
45+
3546
# defer to import/no-extraneous-dependencies
3647
n/no-extraneous-import: 'off'
3748
n/no-extraneous-require: 'off'
49+
3850
# use `module.exports` for commonjs
3951
n/exports-style: ['error', 'module.exports']
52+
4053
# use imports instead of globals
4154
n/prefer-global/text-decoder: ['error', 'never']
4255
n/prefer-global/text-encoder: ['error', 'never']
4356
n/prefer-global/url-search-params: ['error', 'never']
4457
n/prefer-global/url: ['error', 'never']
58+
4559
# use promise APIs
4660
n/prefer-promises/dns: 'error'
4761
n/prefer-promises/fs: 'error'
62+
4863
# make sure callbacks pass error as 1st param
4964
n/no-callback-literal: 'error'

‎typescript-configs/base.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
"allowSyntheticDefaultImports": true,
2020
"target": "es2022",
2121
"sourceMap": true,
22-
"outDir": "./dist",
22+
// TODO: I guess I can't set dirs?
23+
// "outDir": "./dist",
2324

2425
// config
25-
"baseUrl": "./",
26+
// TODO: I guess I can't set dirs?
27+
// "baseUrl": "./",
2628
"noFallthroughCasesInSwitch": false,
2729
"esModuleInterop": true,
2830
// "verbatimModuleSyntax": true, // TODO: what is this?
@@ -37,4 +39,8 @@
3739
"useUnknownInCatchVariables": true,
3840
"noUncheckedIndexedAccess": true // TODO: can we actually do this?
3941
}
42+
// TODO: I guess I can't set dirs?
43+
// "include": ["src/"],
44+
// TODO: I guess I can't set dirs?
45+
// "exclude": ["dist/"]
4046
}

0 commit comments

Comments
 (0)