@juuso.piikkila/eslint-config-typescript 3.0.9 → 3.0.10

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 CHANGED
@@ -1,3 +1,9 @@
1
+ ## [3.0.10](https://github.com/juusopiikkila/eslint-config-typescript/compare/3.0.9...3.0.10) (2025-03-10)
2
+
3
+ ### Bug Fixes
4
+
5
+ * change to module ([d49aef6](https://github.com/juusopiikkila/eslint-config-typescript/commit/d49aef60c520a6dfedb3aae18ef3e01531f22742))
6
+
1
7
  ## [3.0.9](https://github.com/juusopiikkila/eslint-config-typescript/compare/3.0.8...3.0.9) (2025-03-09)
2
8
 
3
9
  ### Bug Fixes
@@ -1,8 +1,14 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies */
2
- const canonical = require('eslint-config-canonical/configurations/canonical');
3
- const regexp = require('eslint-config-canonical/configurations/regexp');
2
+ import stylisticPlugin from '@stylistic/eslint-plugin';
3
+ import canonical from 'eslint-config-canonical/configurations/canonical';
4
+ import regexp from 'eslint-config-canonical/configurations/regexp';
5
+ import canonicalPlugin from 'eslint-plugin-canonical';
6
+ import importPlugin from 'eslint-plugin-import';
7
+ import perfectionistPlugin from 'eslint-plugin-perfectionist';
8
+ import unicornPlugin from 'eslint-plugin-unicorn';
9
+ import { defineConfig } from 'eslint/config';
4
10
 
5
- module.exports = [
11
+ export default defineConfig([
6
12
  canonical.recommended,
7
13
  regexp.recommended,
8
14
  {
@@ -10,11 +16,11 @@ module.exports = [
10
16
  '**/*.{js,jsx,cjs,mjs,ts,tsx,vue}',
11
17
  ],
12
18
  plugins: {
13
- '@stylistic': require('@stylistic/eslint-plugin'),
14
- canonical: require('eslint-plugin-canonical'),
15
- import: require('eslint-plugin-import'),
16
- perfectionist: require('eslint-plugin-perfectionist'),
17
- unicorn: require('eslint-plugin-unicorn'),
19
+ '@stylistic': stylisticPlugin,
20
+ canonical: canonicalPlugin,
21
+ import: importPlugin,
22
+ perfectionist: perfectionistPlugin,
23
+ unicorn: unicornPlugin,
18
24
  },
19
25
  rules: {
20
26
  '@stylistic/array-bracket-newline': [
@@ -177,4 +183,4 @@ module.exports = [
177
183
  ],
178
184
  },
179
185
  },
180
- ];
186
+ ]);
@@ -1,8 +1,10 @@
1
- /* eslint-disable import/no-extraneous-dependencies */
2
- const typescript = require('eslint-config-canonical/configurations/typescript');
3
- const typescriptTypeChecking = require('eslint-config-canonical/configurations/typescript-type-checking');
1
+ import stylisticPlugin from '@stylistic/eslint-config';
2
+ import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
3
+ import typescript from 'eslint-config-canonical/configurations/typescript';
4
+ import typescriptTypeChecking from 'eslint-config-canonical/configurations/typescript-type-checking';
5
+ import { defineConfig } from 'eslint/config';
4
6
 
5
- module.exports = [
7
+ export default defineConfig([
6
8
  typescript.recommended,
7
9
  typescriptTypeChecking.recommended,
8
10
  {
@@ -10,8 +12,8 @@ module.exports = [
10
12
  '**/*.{ts,tsx,vue}',
11
13
  ],
12
14
  plugins: {
13
- '@stylistic': require('@stylistic/eslint-plugin'),
14
- '@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
15
+ '@stylistic': stylisticPlugin,
16
+ '@typescript-eslint': typescriptEslintPlugin,
15
17
  },
16
18
  languageOptions: {
17
19
  parserOptions: {
@@ -106,4 +108,4 @@ module.exports = [
106
108
  '@typescript-eslint/type-annotation-spacing': 'off',
107
109
  },
108
110
  },
109
- ];
111
+ ]);
@@ -1,8 +1,11 @@
1
- const pluginVue = require('eslint-plugin-vue');
2
- const pluginVueA11y = require('eslint-plugin-vuejs-accessibility');
3
- const globals = require('globals');
1
+ import typescriptEslintParser from '@typescript-eslint/parser';
2
+ import pluginVue from 'eslint-plugin-vue';
3
+ import pluginVueA11y from 'eslint-plugin-vuejs-accessibility';
4
+ import { defineConfig } from 'eslint/config';
5
+ import globals from 'globals';
6
+ import vueParser from 'vue-eslint-parser';
4
7
 
5
- module.exports = [
8
+ export default defineConfig([
6
9
  ...pluginVue.configs['flat/recommended'],
7
10
  ...pluginVueA11y.configs['flat/recommended'],
8
11
  {
@@ -15,11 +18,11 @@ module.exports = [
15
18
  globals: {
16
19
  ...globals['shared-node-browser'],
17
20
  },
18
- parser: require('vue-eslint-parser'),
21
+ parser: vueParser,
19
22
  parserOptions: {
20
23
  project: true,
21
24
  parser: {
22
- ts: require('@typescript-eslint/parser'),
25
+ ts: typescriptEslintParser,
23
26
  '<template>': 'espree',
24
27
  },
25
28
  extraFileExtensions: ['.vue'],
@@ -204,4 +207,4 @@ module.exports = [
204
207
  'vuejs-accessibility/label-has-for': 'off',
205
208
  },
206
209
  },
207
- ];
210
+ ]);
package/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'eslint/config';
2
+ import base from './configurations/base';
3
+ import typescript from './configurations/typescript';
4
+
5
+ export default defineConfig([
6
+ ...base,
7
+ ...typescript,
8
+ ]);
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@juuso.piikkila/eslint-config-typescript",
3
3
  "description": "ESLint config for typescript projects",
4
- "version": "3.0.9",
4
+ "version": "3.0.10",
5
5
  "main": "index.cjs",
6
6
  "author": "Juuso Piikkilä",
7
7
  "license": "MIT",
8
8
  "packageManager": "yarn@4.7.0",
9
+ "type": "module",
9
10
  "publishConfig": {
10
11
  "access": "public"
11
12
  },
package/index.cjs DELETED
@@ -1,7 +0,0 @@
1
- const base = require('./configurations/base/index.cjs');
2
- const typescript = require('./configurations/typescript/index.cjs');
3
-
4
- module.exports = [
5
- ...base,
6
- ...typescript,
7
- ];