@fauna/typescript
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -1,4 +0,1 @@ | ||
const eslintConfigPrettier = require("eslint-config-prettier"); | ||
// borrowed from fauna-shell | ||
const config = [ | ||
@@ -12,19 +9,2 @@ { | ||
}, | ||
rules: { | ||
"no-await-in-loop": "off", | ||
"new-cap": "off", | ||
"quote-props": "off", | ||
"no-negated-condition": "off", | ||
"no-warning-comments": "off", | ||
"spaced-comment": "off", | ||
"max-nested-callbacks": "off", | ||
"no-else-return": "off", | ||
"no-console": "off", | ||
"no-multi-str": "off", | ||
"no-prototype-builtins": "off", | ||
"node/no-unsupported-features": "off", | ||
camelcase: "off", | ||
}, | ||
}, | ||
@@ -36,8 +16,27 @@ { | ||
"no-unused-expressions": "off", | ||
"no-empty-function": "off", | ||
"camelcase": "off", | ||
}, | ||
}, | ||
// this disables eslint's formatting rules that collide with prettier's | ||
eslintConfigPrettier, | ||
]; | ||
module.exports = { config }; | ||
const sharedGlobals = { | ||
console: "readonly", | ||
URLSearchParams: "readonly", | ||
Blob: "readonly", | ||
URL: "readonly", | ||
FormData: "readonly", | ||
fetch: "readonly", | ||
}; | ||
const nodeGlobals = { | ||
...sharedGlobals, | ||
Buffer: "readonly", | ||
process: "readonly", | ||
}; | ||
const browserGlobals = { | ||
...sharedGlobals, | ||
}; | ||
module.exports = { config, nodeGlobals, browserGlobals, }; |
{ | ||
"name": "@fauna/typescript", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "A collection of lint, format, and build configs used at Fauna for TypeScript projects.", | ||
@@ -35,3 +35,7 @@ "main": "index.js", | ||
"registry": "https://registry.npmjs.org/" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.13.0", | ||
"eslint-plugin-simple-import-sort": "^12.1.1" | ||
} | ||
} |
@@ -5,4 +5,14 @@ # TypeScript | ||
## Included configs (`./config/`) | ||
- `eslint.config.js`, a minimal placeholder eslint config. | ||
- `eslint.config.js`, a minimal base eslint config. | ||
- `js/eslint.config.js`, an extension of the base config intended for raw javascript projects. | ||
- `.gitignore`, a minimal placeholder .gitignore file. | ||
- `prettierrc.js`, a minimal placeholder prettier config. this is a _stand-alone_ prettier config, and is used as a stand-alone; it's not integrated into eslint ([by choice](https://prettier.io/docs/en/integrating-with-linters.html)). run it before running eslint. we use [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) to remove eslint rules that collide with prettier, so prettier is authoritative on stylistic formatting. | ||
- `prettierrc.js`, a base prettier config. this is a _stand-alone_ prettier config; it's not integrated into eslint ([by choice](https://prettier.io/docs/en/integrating-with-linters.html)). Run it before running eslint. We use [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) to remove eslint rules that collide with prettier, so prettier is authoritative on the formatting it can do. | ||
## Included scripts (`./script/`) | ||
- `eslint-formatter.js`, a custom eslint output formatter intended for estimating the cost of adding new rules to an eslint config. From a consumer of `@fauna/typescript`, run it like `npx eslint --format ./node_modules/@fauna/typescript/scripts/eslint-formatter.js .`. | ||
- `version-bump.js`, a script intended for use in CI environments to automatically version bump a npm package. Useful for packages that should be versioned and deployed on every merge to `main`. | ||
## Workflows | ||
### Development | ||
Develop on this package by running `npm install && npm link`. Then, navigate to a package that depends on this project and run `npm link @fauna/typescript`. [npm link](https://docs.npmjs.com/cli/v10/commands/npm-link) builds a symlink from the node_modules directory of the dependent package to `@fauna/typescript`, allowing you to develop locally in real time. When done, run `npm unlink @fauna/typescript` from any directory. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7477
5
152
18
2