@baseplate-dev/tools 0.3.6 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/eslint-configs/react.js
CHANGED
|
@@ -8,6 +8,7 @@ import eslintPluginImportX from 'eslint-plugin-import-x';
|
|
|
8
8
|
import reactJsxA11yPlugin from 'eslint-plugin-jsx-a11y';
|
|
9
9
|
import reactPlugin from 'eslint-plugin-react';
|
|
10
10
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
|
11
|
+
import globals from 'globals';
|
|
11
12
|
import tsEslint from 'typescript-eslint';
|
|
12
13
|
|
|
13
14
|
/** @type {GenerateTypescriptEslintConfigOptions} */
|
|
@@ -19,6 +20,9 @@ export const reactEslintConfig = tsEslint.config(
|
|
|
19
20
|
// React & A11y
|
|
20
21
|
{
|
|
21
22
|
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
|
|
23
|
+
languageOptions: {
|
|
24
|
+
globals: { ...globals.browser },
|
|
25
|
+
},
|
|
22
26
|
extends: [
|
|
23
27
|
reactPlugin.configs.flat?.recommended,
|
|
24
28
|
reactPlugin.configs.flat?.['jsx-runtime'],
|
|
@@ -6,6 +6,7 @@ import { importX } from 'eslint-plugin-import-x';
|
|
|
6
6
|
import perfectionist from 'eslint-plugin-perfectionist';
|
|
7
7
|
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
|
8
8
|
import unusedImports from 'eslint-plugin-unused-imports';
|
|
9
|
+
import globals from 'globals';
|
|
9
10
|
import tsEslint from 'typescript-eslint';
|
|
10
11
|
|
|
11
12
|
import noUnusedGeneratorDependencies from './rules/no-unused-generator-dependencies.js';
|
|
@@ -47,6 +48,9 @@ export function generateTypescriptEslintConfig(options = []) {
|
|
|
47
48
|
// ESLint Configs for all files
|
|
48
49
|
eslint.configs.recommended,
|
|
49
50
|
{
|
|
51
|
+
languageOptions: {
|
|
52
|
+
globals: { ...globals.node },
|
|
53
|
+
},
|
|
50
54
|
rules: {
|
|
51
55
|
// disallow console.log since that is typically used for debugging
|
|
52
56
|
'no-console': ['error', { allow: ['warn', 'error', 'debug', 'info'] }],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baseplate-dev/tools",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Shared dev configurations for linting, formatting, and testing Baseplate projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"development-tools",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"eslint-plugin-storybook": "9.0.18",
|
|
65
65
|
"eslint-plugin-unicorn": "60.0.0",
|
|
66
66
|
"eslint-plugin-unused-imports": "4.1.4",
|
|
67
|
+
"globals": "16.4.0",
|
|
67
68
|
"prettier-plugin-packagejson": "2.5.19",
|
|
68
69
|
"prettier-plugin-tailwindcss": "0.6.14",
|
|
69
70
|
"typescript-eslint": "8.38.0"
|