From 328b33d93ad458e7e32a61bf988828f42c76a070 Mon Sep 17 00:00:00 2001 From: beefchimi Date: Wed, 31 Jul 2024 09:53:28 -0400 Subject: [PATCH] :fire: [Temp] Remove temporary notes file --- TEMP.md | 154 +------------------------------------------------------- 1 file changed, 1 insertion(+), 153 deletions(-) diff --git a/TEMP.md b/TEMP.md index 4f54603..e694ba5 100644 --- a/TEMP.md +++ b/TEMP.md @@ -2,163 +2,11 @@ This file exists until we have finished our `eslint` migration. -## contributing.md - -```md -- `format` checks the codebase for `prettier` errors, but does not fix them. -- `format:fix` automatically fixes any `prettier` errors that can be programatically resolved. -``` - -## Root package.json - -```json -{ - "lint": "pnpm -r lint && eslint .", - "lint:fix": "pnpm -r lint:fix && eslint . --fix", - "format": "prettier --check .", - "format:fix": "prettier --write ." -} -``` - -## Website package.json - -```json -{ - "lint": "eslint .", - "lint:fix": "eslint . --fix" -} -``` - -## Website eslint config - -```mjs -import path from 'node:path'; -import {fileURLToPath} from 'node:url'; -import globals from 'globals'; -import configLove from 'eslint-config-love'; -// Includes both `config` and `plugin`. -import pluginPrettier from 'eslint-plugin-prettier/recommended'; - -// TODO: Update this once the various `vue > eslint` packages -// fully support the new flat config. - -import {FlatCompat} from '@eslint/eslintrc'; -import pluginVue from 'eslint-plugin-vue'; - -// import vueParser from 'vue-eslint-parser'; -// import tsParser from '@typescript-eslint/parser'; -// import tsPlugin from '@typescript-eslint/eslint-plugin'; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, -}); - -// TODO: This config currently is not working... as we do not appear -// to end up with the correct parser. -export default [ - { - // ignores: ['.nx/cache', 'coverage/**', 'dist/**', 'scrap/**'], - - // We want the root `eslint` config to handle everything outside - // of this folder, so we will ignore everything except `/app`. - // ignores: ['**/*', '!app/**/*/'], - - ignores: ['.nx/cache', 'coverage/**', 'dist/**', 'scrap/**'], - }, - - configLove, - pluginPrettier, - - ...pluginVue.configs['flat/essential'], - ...compat.extends('@vue/eslint-config-typescript/recommended'), - ...compat.extends('@vue/eslint-config-prettier/skip-formatting'), - - { - name: 'vue-rules', - files: ['**/*.vue', '**/*.ts', '**/*.mjs'], - - languageOptions: { - ...configLove.languageOptions, - globals: { - ...globals.browser, - }, - // ecmaVersion: 2022, - ecmaVersion: 'latest', - sourceType: 'module', - }, - - // Taken from: - // https://github.com/vuejs/vue-eslint-parser/issues/232 - /* - languageOptions: { - parser: vueParser, - parserOptions: { - parser: tsParser, - }, - ecmaVersion: 'latest', - }, - */ - - rules: { - 'no-console': 'warn', - - // TODO: Get this import rule working. - // https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/no-duplicates.md - /* - 'import/no-duplicates': [ - 'error', - {'prefer-inline': true}, - ], - */ - - 'vue/multi-word-component-names': [ - 'error', - {ignores: ['Thumbnail', 'Tooltip']}, - ], - 'vue/no-undef-components': ['error'], - - // TODO: Remove these rules once their feature is - // no longer experimental. - 'vue/no-setup-props-destructure': 'off', - }, - }, -]; -``` - -## Prettier - -```json -{ - "bracketSpacing": false, - "singleQuote": true -} -``` - -## Prettier ignore - -```txt -package-lock.json -pnpm-lock.yaml -tsconfig.json -tsconfig.*.json -.changeset/*.md -``` - -### Issues +## Issues - Can import order be improved to be relative paths at the bottom? -- Restore `"earwurm": "workspace:*",` within `website > package.json` once we get it working. - `.ts` within markdown does not appear to work. Getting errors for type declarations. - Remove all instances of ``. - Check in on instances of `// eslint-disable-next-line ts/return-await` - Fix broken `if/else` statements. - Search for `else` with spaces. - -### Test - -```vue -import Thumbnail from '@/components/Thumbnail.vue'; - -```