@voiceflow/eslint-config 7.15.0 → 7.16.0

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/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@voiceflow/eslint-config",
3
- "version": "7.15.0",
3
+ "version": "7.16.0",
4
+ "type": "module",
4
5
  "exports": {
5
6
  ".": "./src/index.js",
6
7
  "./node": "./src/node.js"
@@ -18,29 +19,29 @@
18
19
  "test:dependencies": "yarn g:depcruise --ignore-known"
19
20
  },
20
21
  "dependencies": {
21
- "@typescript-eslint/eslint-plugin": "8.21.0",
22
- "@typescript-eslint/parser": "8.21.0",
22
+ "@typescript-eslint/eslint-plugin": "8.47.0",
23
+ "@typescript-eslint/parser": "8.47.0",
23
24
  "eslint-config-airbnb-base": "15.0.0",
24
- "eslint-config-prettier": "10.0.1",
25
- "eslint-formatter-junit": "8.40.0",
26
- "eslint-formatter-stylish": "8.40.0",
27
- "eslint-import-resolver-typescript": "3.7.0",
25
+ "eslint-config-prettier": "10.1.8",
26
+ "eslint-formatter-junit": "9.0.1",
27
+ "eslint-formatter-stylish": "9.0.1",
28
+ "eslint-import-resolver-typescript": "4.4.4",
28
29
  "eslint-plugin-eslint-comments": "3.2.0",
29
- "eslint-plugin-import": "2.31.0",
30
- "eslint-plugin-jsdoc": "50.6.2",
31
- "eslint-plugin-mdx": "3.1.5",
32
- "eslint-plugin-no-secrets": "2.1.1",
33
- "eslint-plugin-prettier": "5.2.3",
30
+ "eslint-plugin-import": "2.32.0",
31
+ "eslint-plugin-jsdoc": "61.3.0",
32
+ "eslint-plugin-mdx": "3.6.2",
33
+ "eslint-plugin-no-secrets": "2.2.1",
34
+ "eslint-plugin-prettier": "5.5.4",
34
35
  "eslint-plugin-promise": "7.2.1",
35
36
  "eslint-plugin-simple-import-sort": "12.1.1",
36
- "eslint-plugin-sonarjs": "3.0.1",
37
- "eslint-plugin-unicorn": "56.0.1",
37
+ "eslint-plugin-sonarjs": "3.0.5",
38
+ "eslint-plugin-unicorn": "62.0.0",
38
39
  "eslint-plugin-you-dont-need-lodash-underscore": "6.14.0",
39
- "globals": "15.14.0"
40
+ "globals": "16.5.0"
40
41
  },
41
42
  "devDependencies": {
42
43
  "@voiceflow/dependency-cruiser-config": "1.8.9",
43
- "@voiceflow/eslint-plugin": "1.3.0"
44
+ "@voiceflow/eslint-plugin": "1.4.0"
44
45
  },
45
46
  "peerDependencies": {
46
47
  "@voiceflow/eslint-plugin": "^1"
@@ -51,5 +52,5 @@
51
52
  "volta": {
52
53
  "extends": "../../package.json"
53
54
  },
54
- "gitHead": "200e1ee370c851867b580aea82f76c6a31c6cdc1"
55
+ "gitHead": "7c313da9e930246078db748eda0e785274fba20d"
55
56
  }
package/src/base.js CHANGED
@@ -1,10 +1,10 @@
1
- const airbnb = require('./presets/airbnb');
2
- const common = require('./presets/common');
3
- const import_ = require('./presets/import');
4
- const voiceflow = require('./presets/voiceflow');
1
+ import airbnb from './presets/airbnb.js';
2
+ import common from './presets/common.js';
3
+ import import_ from './presets/import.js';
4
+ import voiceflow from './presets/voiceflow.js';
5
5
 
6
6
  /** @type {import('eslint').Linter.Config[]} */
7
- module.exports = [
7
+ export default [
8
8
  {
9
9
  ignores: [
10
10
  '**/build/**',
package/src/formatter.js CHANGED
@@ -1,10 +1,11 @@
1
- const fs = require('fs/promises');
2
- const junit = require('eslint-formatter-junit');
3
- const stylish = require('eslint-formatter-stylish');
1
+ import fs from 'node:fs/promises';
4
2
 
5
- module.exports = async function (results, context) {
3
+ import junit from 'eslint-formatter-junit';
4
+ import stylish from 'eslint-formatter-stylish';
5
+
6
+ export default async function (results, context) {
6
7
  await fs.mkdir('reports', { recursive: true });
7
8
  await fs.writeFile('reports/lint.report.xml', junit(results, context));
8
9
 
9
10
  return stylish(results, context);
10
- };
11
+ }
package/src/index.js CHANGED
@@ -1,9 +1,9 @@
1
- const base = require('./base');
2
- const typescript = require('./presets/typescript');
3
- const mdx = require('./presets/mdx');
4
- const nest = require('./presets/nest');
5
- const utility = require('./presets/utility');
6
- const voiceflow = require('./presets/voiceflow');
1
+ import base from './base.js';
2
+ import mdx from './presets/mdx.js';
3
+ import nest from './presets/nest.js';
4
+ import typescript from './presets/typescript.js';
5
+ import utility from './presets/utility.js';
6
+ import voiceflow from './presets/voiceflow.js';
7
7
 
8
8
  /** @type {import('eslint').Linter.Config[]} */
9
- module.exports = [...base, ...typescript, ...mdx, ...nest, ...utility, ...voiceflow];
9
+ export default [...base, ...typescript, ...mdx, ...nest, ...utility, ...voiceflow];
package/src/node.js CHANGED
@@ -1,8 +1,9 @@
1
- const baseConfig = require('.');
2
- const globals = require('globals');
1
+ import globals from 'globals';
2
+
3
+ import baseConfig from './index.js';
3
4
 
4
5
  /** @type {import('eslint').Linter.Config[]} */
5
- module.exports = [
6
+ export default [
6
7
  ...baseConfig,
7
8
  {
8
9
  languageOptions: {
@@ -1,10 +1,13 @@
1
- const airbnbBestPractices = require('eslint-config-airbnb-base/rules/best-practices');
2
- const airbnbErrors = require('eslint-config-airbnb-base/rules/errors');
3
- const airbnbStyle = require('eslint-config-airbnb-base/rules/style');
4
- const airbnbVariables = require('eslint-config-airbnb-base/rules/variables');
5
- const airbnbStrict = require('eslint-config-airbnb-base/rules/strict');
6
- const { env: _nodeEnv, ...airbnbNode } = require('eslint-config-airbnb-base/rules/node');
7
- const { env: _es6Env, parserOptions: _es6Parser, ...airbnbES6 } = require('eslint-config-airbnb-base/rules/es6');
1
+ import bestPractices from 'eslint-config-airbnb-base/rules/best-practices';
2
+ import errors from 'eslint-config-airbnb-base/rules/errors';
3
+ import es6Rules from 'eslint-config-airbnb-base/rules/es6';
4
+ import nodeRules from 'eslint-config-airbnb-base/rules/node';
5
+ import strict from 'eslint-config-airbnb-base/rules/strict';
6
+ import style from 'eslint-config-airbnb-base/rules/style';
7
+ import variables from 'eslint-config-airbnb-base/rules/variables';
8
+
9
+ const { env: _nodeEnv, ...node } = nodeRules;
10
+ const { env: _es6Env, parserOptions: _es6Parser, ...es6 } = es6Rules;
8
11
 
9
12
  /** @type {import('eslint').Linter.Config[]} */
10
- module.exports = [airbnbBestPractices, airbnbErrors, airbnbNode, airbnbStyle, airbnbVariables, airbnbES6, airbnbStrict];
13
+ export default [bestPractices, errors, node, style, variables, es6, strict];
@@ -1,14 +1,14 @@
1
- const sonarjs = require('eslint-plugin-sonarjs');
2
- const promise = require('eslint-plugin-promise');
3
- const noSecrets = require('eslint-plugin-no-secrets');
4
- const comments = require('eslint-plugin-eslint-comments');
5
- const youDontNeed = require('eslint-plugin-you-dont-need-lodash-underscore');
6
- const unicorn = require('eslint-plugin-unicorn');
7
- const prettier = require('eslint-plugin-prettier/recommended');
8
- const jsdoc = require('eslint-plugin-jsdoc');
1
+ import comments from 'eslint-plugin-eslint-comments';
2
+ import jsdoc from 'eslint-plugin-jsdoc';
3
+ import noSecrets from 'eslint-plugin-no-secrets';
4
+ import prettier from 'eslint-plugin-prettier/recommended';
5
+ import promise from 'eslint-plugin-promise';
6
+ import sonarjs from 'eslint-plugin-sonarjs';
7
+ import unicorn from 'eslint-plugin-unicorn';
8
+ import youDontNeed from 'eslint-plugin-you-dont-need-lodash-underscore';
9
9
 
10
10
  /** @type {import('eslint').Linter.Config[]} */
11
- module.exports = [
11
+ export default [
12
12
  {
13
13
  plugins: {
14
14
  jsdoc,
@@ -1,14 +1,12 @@
1
- const globals = require('globals');
2
- const import_ = require('eslint-plugin-import');
3
- const simpleImportSort = require('eslint-plugin-simple-import-sort');
4
- const {
5
- env: _importsEnv,
6
- parserOptions: _importsParser,
7
- ...airbnbImports
8
- } = require('eslint-config-airbnb-base/rules/imports');
1
+ import airbnbImportsRules from 'eslint-config-airbnb-base/rules/imports';
2
+ import import_ from 'eslint-plugin-import';
3
+ import simpleImportSort from 'eslint-plugin-simple-import-sort';
4
+ import globals from 'globals';
5
+
6
+ const { env: _importsEnv, parserOptions: _importsParser, ...airbnbImports } = airbnbImportsRules;
9
7
 
10
8
  /** @type {import('eslint').Linter.Config[]} */
11
- module.exports = [
9
+ export default [
12
10
  {
13
11
  plugins: {
14
12
  import: import_,
@@ -1,7 +1,7 @@
1
- const mdx = require('eslint-plugin-mdx');
1
+ import * as mdx from 'eslint-plugin-mdx';
2
2
 
3
3
  /** @type {import('eslint').Linter.Config[]} */
4
- module.exports = [
4
+ export default [
5
5
  {
6
6
  ...mdx.flat,
7
7
  files: ['**/*.mdx'],
@@ -1,5 +1,5 @@
1
1
  /** @type {import('eslint').Linter.Config} */
2
- module.exports = [
2
+ export default [
3
3
  {
4
4
  files: ['**/*.controller.ts', '**/*.decorator.ts', '**/*.factory.ts', '**/*.module.ts', '**/*.service.ts'],
5
5
 
@@ -1,8 +1,8 @@
1
- const typescript = require('@typescript-eslint/eslint-plugin');
2
- const typescriptParser = require('@typescript-eslint/parser');
1
+ import typescript from '@typescript-eslint/eslint-plugin';
2
+ import typescriptParser from '@typescript-eslint/parser';
3
3
 
4
4
  /** @type {import('eslint').Linter.Config[]} */
5
- module.exports = [
5
+ export default [
6
6
  {
7
7
  files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
8
8
 
@@ -1,7 +1,7 @@
1
1
  const EXTENSIONS = `{${['js', 'jsx', 'cjs', 'mjs', 'ts', 'tsx', 'cts', 'mts'].join(',')}}`;
2
2
 
3
3
  /** @type {import('eslint').Linter.Config[]} */
4
- module.exports = [
4
+ export default [
5
5
  {
6
6
  files: [
7
7
  `**/*.test.${EXTENSIONS}`,
@@ -1,7 +1,7 @@
1
- const { voiceflowConfig } = require('@voiceflow/eslint-plugin');
1
+ import { voiceflowConfig } from '@voiceflow/eslint-plugin';
2
2
 
3
3
  /** @type {import('eslint').Linter.Config[]} */
4
- module.exports = [
4
+ export default [
5
5
  {
6
6
  plugins: {
7
7
  '@voiceflow': voiceflowConfig,