From 0ac115a495fa049fc98a1bd34d90907f3127b078 Mon Sep 17 00:00:00 2001 From: Dantemis Date: Thu, 1 Feb 2024 20:37:52 +0000 Subject: [PATCH] style: format code with Prettier and StandardJS This commit fixes the style issues introduced in ff9a81d according to the output from Prettier and StandardJS. Details: https://github.com/The-Creative-Programming-Group/Weather-App/pull/184 --- packages/city-data/src/createJSONL.mjs | 10 ++--- tooling/eslint/base.js | 56 +++++++++++++------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/packages/city-data/src/createJSONL.mjs b/packages/city-data/src/createJSONL.mjs index 69185b4..e8eb54a 100644 --- a/packages/city-data/src/createJSONL.mjs +++ b/packages/city-data/src/createJSONL.mjs @@ -1,6 +1,6 @@ -import fs from "fs" -import jsonl from "jsonl" +import fs from 'fs' +import jsonl from 'jsonl' -fs.createReadStream("./city-list.json") - .pipe(jsonl()) - .pipe(fs.createWriteStream("./city-list.jsonl")) \ No newline at end of file +fs.createReadStream('./city-list.json') + .pipe(jsonl()) + .pipe(fs.createWriteStream('./city-list.jsonl')) diff --git a/tooling/eslint/base.js b/tooling/eslint/base.js index c24fdc3..66b0172 100644 --- a/tooling/eslint/base.js +++ b/tooling/eslint/base.js @@ -1,45 +1,45 @@ /** @type {import("eslint").Linter.Config} */ const config = { extends: [ - "turbo", - "eslint:recommended", - "plugin:@typescript-eslint/recommended-type-checked", - "plugin:@typescript-eslint/stylistic-type-checked", - "prettier", + 'turbo', + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended-type-checked', + 'plugin:@typescript-eslint/stylistic-type-checked', + 'prettier' ], env: { es2022: true, - node: true, + node: true }, - parser: "@typescript-eslint/parser", + parser: '@typescript-eslint/parser', parserOptions: { project: true }, - plugins: ["@typescript-eslint", "import"], + plugins: ['@typescript-eslint', 'import'], rules: { - "turbo/no-undeclared-env-vars": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, + 'turbo/no-undeclared-env-vars': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { argsIgnorePattern: '^_', varsIgnorePattern: '^_' } ], - "@typescript-eslint/consistent-type-imports": [ - "warn", - { prefer: "type-imports", fixStyle: "separate-type-imports" }, + '@typescript-eslint/consistent-type-imports': [ + 'warn', + { prefer: 'type-imports', fixStyle: 'separate-type-imports' } ], - "@typescript-eslint/no-misused-promises": [ + '@typescript-eslint/no-misused-promises': [ 2, - { checksVoidReturn: { attributes: false } }, + { checksVoidReturn: { attributes: false } } ], - "import/consistent-type-specifier-style": ["error", "prefer-top-level"], + 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'] }, ignorePatterns: [ - "**/*.config.js", - "**/*.config.cjs", - "**/.eslintrc.cjs", - ".next", - "dist", - "pnpm-lock.yaml", - "_generated", + '**/*.config.js', + '**/*.config.cjs', + '**/.eslintrc.cjs', + '.next', + 'dist', + 'pnpm-lock.yaml', + '_generated' ], - reportUnusedDisableDirectives: true, -}; + reportUnusedDisableDirectives: true +} -module.exports = config; +module.exports = config