diff options
| author | 2023-04-28 01:36:44 +0800 | |
|---|---|---|
| committer | 2023-04-28 01:36:44 +0800 | |
| commit | dd84b9d64fb98746a230cd24233ff50a562c39c9 (patch) | |
| tree | b583261ef00b3afe72ec4d6dacb31e57779a6faf /packages/eslint-plugin-turbo/lib/configs | |
| parent | 0b46fcd72ac34382387b2bcf9095233efbcc52f4 (diff) | |
| download | HydroRoll-dd84b9d64fb98746a230cd24233ff50a562c39c9.tar.gz HydroRoll-dd84b9d64fb98746a230cd24233ff50a562c39c9.zip | |
Diffstat (limited to 'packages/eslint-plugin-turbo/lib/configs')
| -rw-r--r-- | packages/eslint-plugin-turbo/lib/configs/recommended.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/eslint-plugin-turbo/lib/configs/recommended.ts b/packages/eslint-plugin-turbo/lib/configs/recommended.ts new file mode 100644 index 0000000..e247503 --- /dev/null +++ b/packages/eslint-plugin-turbo/lib/configs/recommended.ts @@ -0,0 +1,26 @@ +import { RULES } from "../constants"; +import getEnvVarDependencies from "../utils/getEnvVarDependencies"; + +// Add the environment variables into the ESLint incremental cache key. +const envVars = getEnvVarDependencies({ + cwd: process.cwd(), +}); +const settings = { + turbo: { + envVars: envVars + ? Object.values(envVars) + .flatMap((s) => Array.from(s)) + .sort() + : [], + }, +}; + +const config = { + settings, + plugins: ["turbo"], + rules: { + [`turbo/${RULES.noUndeclaredEnvVars}`]: "error", + }, +}; + +export default config; |
