From 1c7e77b8546ac32b8176ab54dd06ede6ba7deb55 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 2 Oct 2024 10:12:46 +0800 Subject: style: switch to standardjs --- eslint.config.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'eslint.config.js') diff --git a/eslint.config.js b/eslint.config.js index 7ac6782..3bca729 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,16 +1,16 @@ -import globals from "globals"; -import js from "@eslint/js"; -import importPlugin from "eslint-plugin-import"; -import promisePlugin from "eslint-plugin-promise"; -import nodePlugin from "eslint-plugin-node"; -import jsdoc from 'eslint-plugin-jsdoc'; +import globals from 'globals' +import js from '@eslint/js' +import importPlugin from 'eslint-plugin-import' +import promisePlugin from 'eslint-plugin-promise' +import nodePlugin from 'eslint-plugin-node' +import jsdoc from 'eslint-plugin-jsdoc' export default [ js.configs.recommended, { languageOptions: { ecmaVersion: 2022, - sourceType: "module", + sourceType: 'module', globals: { ...globals.browser, ...globals.node @@ -19,31 +19,31 @@ export default [ plugins: { import: importPlugin, promise: promisePlugin, - node: nodePlugin, + node: nodePlugin }, rules: { 'no-unused-vars': ['warn', { - 'varsIgnorePattern': '^_', - "argsIgnorePattern": "^_", - "caughtErrorsIgnorePattern": "^ignore|_", + varsIgnorePattern: '^_', + argsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^ignore|_' }], 'import/no-unresolved': 'error', - 'no-console': ["error", { allow: ["info", "warn", "error"] }], - 'eqeqeq': ['error', 'always'], + 'no-console': ['error', { allow: ['info', 'warn', 'error'] }], + eqeqeq: ['error', 'always'], // 'curly': ['warn', 'multi'], 'prefer-const': 'error', 'no-var': 'error', 'array-callback-return': 'error', - 'no-unexpected-multiline': 'warn', - }, + 'no-unexpected-multiline': 'warn' + } }, { files: ['src/*js'], plugins: { - jsdoc, + jsdoc }, rules: { 'jsdoc/require-description': 'warn' } - }, -]; + } +] -- cgit v1.2.3-70-g09d2