Skip to content

Commit

Permalink
feat: export globals
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreDemailly committed Aug 15, 2024
1 parent aedd2d7 commit 5ef9d92
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/eslint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,27 @@ export default [
];
```

### Globals

This package export the npm package `globals` in case you need to add global variables to your project.

For instance if you need browser globals you can add the following to your `eslint.config.mjs` file:

```js
// eslint.config.mjs
import { ESLintConfig, globals } from "@openally/config.eslint";

export default [
...ESLintConfig,
{
languageOptions: {
globals: {
...globals.browser
}
}
}
];
```

## License
MIT
1 change: 1 addition & 0 deletions src/eslint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ export function typescriptConfig(
tsEslint.config(...kBaseTypeScriptConfigs, config) :
tsEslint.config(...kBaseTypeScriptConfigs);
}
export { globals };

0 comments on commit 5ef9d92

Please sign in to comment.