@equinor/cpl-eslint-config 1.0.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,73 @@
1
+ # eslint-config-custom
2
+
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - c9a4c62: Allow public publishing
8
+
9
+ ## 1.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 0c1c210: Upgrade packages and pin versions for enhanced security
14
+
15
+ ## 1.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - 4c33fd6: Require EDS 2.2.0 as the lowest version
20
+
21
+ ## 0.0.9
22
+
23
+ ### Patch Changes
24
+
25
+ - 81e75da: Security upgrades.
26
+
27
+ ## 0.0.8
28
+
29
+ ### Patch Changes
30
+
31
+ - 59e6cb7: Rename ESLint and TypeScript configs
32
+
33
+ ## 0.0.7
34
+
35
+ ### Patch Changes
36
+
37
+ - 65fc1a2: Upgrade dev dependencies
38
+
39
+ ## 0.0.6
40
+
41
+ ### Patch Changes
42
+
43
+ - 241fa05: Update dependencies
44
+
45
+ ## 0.0.5
46
+
47
+ ### Patch Changes
48
+
49
+ - e38b183: Upgrade deps
50
+
51
+ ## 0.0.4
52
+
53
+ ### Patch Changes
54
+
55
+ - a358002: Move dev dependencies to devDependencies for packages
56
+
57
+ ## 0.0.3
58
+
59
+ ### Patch Changes
60
+
61
+ - f338d1a: Fix snyk issues
62
+
63
+ ## 0.0.2
64
+
65
+ ### Patch Changes
66
+
67
+ - c424fde: Set eslint-config-custom to private
68
+
69
+ ## 0.0.1
70
+
71
+ ### Patch Changes
72
+
73
+ - d073cc3: Upgrade to TypeScript 5.2.2
package/LICENCE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Equinor ASA
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/base.js ADDED
@@ -0,0 +1,29 @@
1
+ import js from '@eslint/js'
2
+ import eslintConfigPrettier from 'eslint-config-prettier'
3
+ import onlyWarn from 'eslint-plugin-only-warn'
4
+ import turboPlugin from 'eslint-plugin-turbo'
5
+ import { defineConfig, globalIgnores } from 'eslint/config'
6
+ import tseslint from 'typescript-eslint'
7
+
8
+ /**
9
+ * A shared ESLint configuration for the repository.
10
+ */
11
+ export const config = defineConfig(
12
+ globalIgnores(['dist/**']),
13
+ js.configs.recommended,
14
+ eslintConfigPrettier,
15
+ ...tseslint.configs.recommended,
16
+ {
17
+ plugins: {
18
+ turbo: turboPlugin,
19
+ },
20
+ rules: {
21
+ 'turbo/no-undeclared-env-vars': 'warn',
22
+ },
23
+ },
24
+ {
25
+ plugins: {
26
+ onlyWarn,
27
+ },
28
+ }
29
+ )
package/index.js ADDED
@@ -0,0 +1,29 @@
1
+ import js from '@eslint/js'
2
+ import eslintConfigPrettier from 'eslint-config-prettier'
3
+ import onlyWarn from 'eslint-plugin-only-warn'
4
+ import turboPlugin from 'eslint-plugin-turbo'
5
+ import { defineConfig, globalIgnores } from 'eslint/config'
6
+ import tseslint from 'typescript-eslint'
7
+
8
+ /**
9
+ * A shared ESLint configuration for the repository.
10
+ */
11
+ export const config = defineConfig(
12
+ globalIgnores(['dist/**']),
13
+ js.configs.recommended,
14
+ eslintConfigPrettier,
15
+ tseslint.configs.recommended,
16
+ {
17
+ plugins: {
18
+ turbo: turboPlugin,
19
+ },
20
+ rules: {
21
+ 'turbo/no-undeclared-env-vars': 'warn',
22
+ },
23
+ },
24
+ {
25
+ plugins: {
26
+ onlyWarn,
27
+ },
28
+ }
29
+ )
package/next.js ADDED
@@ -0,0 +1,18 @@
1
+ import pluginNext from '@next/eslint-plugin-next'
2
+ import { defineConfig, globalIgnores } from 'eslint/config'
3
+ import { config as reactConfig } from './react.js'
4
+
5
+ /**
6
+ * A custom ESLint configuration for libraries that use Next.js.
7
+ */
8
+ export const config = defineConfig(
9
+ reactConfig,
10
+ globalIgnores([
11
+ // Default ignores of eslint-config-next:
12
+ '.next/**',
13
+ 'out/**',
14
+ 'build/**',
15
+ 'next-env.d.ts',
16
+ ]),
17
+ pluginNext.flatConfig.coreWebVitals
18
+ )
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@equinor/cpl-eslint-config",
3
+ "version": "1.0.2",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./base": "./base.js",
9
+ "./next": "./next.js",
10
+ "./react": "./react.js"
11
+ },
12
+ "devDependencies": {
13
+ "@eslint/js": "10.0.1",
14
+ "@next/eslint-plugin-next": "16.1.6",
15
+ "eslint": "10.0.0",
16
+ "eslint-config-prettier": "10.1.8",
17
+ "eslint-plugin-only-warn": "1.1.0",
18
+ "eslint-plugin-react": "7.37.5",
19
+ "eslint-plugin-react-hooks": "7.0.1",
20
+ "eslint-plugin-turbo": "2.8.5",
21
+ "globals": "17.3.0",
22
+ "typescript": "5.9.3",
23
+ "typescript-eslint": "8.55.0"
24
+ },
25
+ "publishConfig": {
26
+ "access": "public"
27
+ }
28
+ }
package/react.js ADDED
@@ -0,0 +1,24 @@
1
+ import pluginReact from 'eslint-plugin-react'
2
+ import pluginReactHooks from 'eslint-plugin-react-hooks'
3
+ import { defineConfig } from 'eslint/config'
4
+ import globals from 'globals'
5
+ import { config as baseConfig } from './index.js'
6
+
7
+ /**
8
+ * A custom ESLint configuration for libraries that use React.
9
+ */
10
+ export const config = defineConfig([
11
+ ...baseConfig,
12
+ pluginReact.configs.flat.recommended,
13
+ pluginReact.configs.flat['jsx-runtime'],
14
+ {
15
+ languageOptions: {
16
+ ...pluginReact.configs.flat.recommended.languageOptions,
17
+ globals: {
18
+ ...globals.serviceworker,
19
+ ...globals.browser,
20
+ },
21
+ },
22
+ },
23
+ pluginReactHooks.configs.flat.recommended,
24
+ ])