Skip to content

Commit

Permalink
Add a global exports to easier global definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Apr 11, 2024
1 parent 4a82190 commit 8ac5ee5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
9 changes: 9 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import { js, vue, prettier } from './src/index.js';
import { globals } from './src/utils.js';

export default [
...js,
...vue,
...prettier,
{
files: ['test/build-files/**/*'],
languageOptions: {
globals: {
...globals.node,
},
},
},
];
31 changes: 17 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"description": "ESLint Configuration",
"type": "module",
"main": "src/index.js",
"exports": {
".": "./src/index.js",
"./utils": "./src/utils.js"
},
"scripts": {
"test": "eslint test/",
"lint": "eslint src/",
Expand All @@ -28,7 +32,8 @@
"eslint-plugin-jsdoc": "^48.2.3",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-vue": "^9.24.1"
"eslint-plugin-vue": "^9.24.1",
"globals": "^15.0.0"
},
"devDependencies": {
"@studiometa/prettier-config": "^4.0.0",
Expand Down
3 changes: 3 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import globals from 'globals';

export { globals };

0 comments on commit 8ac5ee5

Please sign in to comment.