diff --git a/eslint.config.js b/eslint.config.js index 33f7b29..baf3ad6 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,10 +1,11 @@ import js from '@eslint/js' -import globals from 'globals' +import importPlugin from 'eslint-plugin-import' import react from 'eslint-plugin-react' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' +import globals from 'globals' import tseslint from 'typescript-eslint' -import importPlugin from 'eslint-plugin-import' + export default tseslint.config( { @@ -18,7 +19,7 @@ export default tseslint.config( ...tseslint.configs.stylisticTypeChecked, importPlugin.flatConfigs.recommended, ], - files: ['**/*.{ts,tsx}'], // to add .js + files: ['**/*.{js,jsx,ts,tsx}'], languageOptions: { ecmaVersion: 'latest', globals: { @@ -47,16 +48,16 @@ export default tseslint.config( '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-return': 'off', - "@typescript-eslint/no-unused-vars": [ - "error", + '@typescript-eslint/no-unused-vars': [ + 'error', { - "args": "all", - "argsIgnorePattern": "^_", - "caughtErrors": "all", - "caughtErrorsIgnorePattern": "^_", - "destructuredArrayIgnorePattern": "^_", - "varsIgnorePattern": "^_", - "ignoreRestSiblings": true + 'args': 'all', + 'argsIgnorePattern': '^_', + 'caughtErrors': 'all', + 'caughtErrorsIgnorePattern': '^_', + 'destructuredArrayIgnorePattern': '^_', + 'varsIgnorePattern': '^_', + 'ignoreRestSiblings': true } ], '@typescript-eslint/unbound-method': 'off', @@ -82,12 +83,12 @@ export default tseslint.config( 'ignoreUrls': true } ], - "no-trailing-spaces": "error", - "no-unused-vars": "off", - 'quotes': ["error", "single"], + 'no-trailing-spaces': 'error', + 'no-unused-vars': 'off', + 'quotes': ['error', 'single'], 'react/prop-types': 'off', 'react-refresh/only-export-components': 'off', - "semi": ["error", "never"], + 'semi': ['error', 'never'], }, settings: { react: { version: '18.3' } }, }, diff --git a/scripts/mongo-init.js b/scripts/mongo-init.js index 92d97a8..7594abd 100644 --- a/scripts/mongo-init.js +++ b/scripts/mongo-init.js @@ -9,115 +9,115 @@ db.createUser( db.createCollection('ua-quotes') db['ua-quotes'].insert({ - message: "This is a sample quote", - author: "Author Name" + message: 'This is a sample quote', + author: 'Author Name' }) db.createCollection('ua-places') db['ua-places'].insertMany([ { - id: "1", - name: "Place 1", - address: "Address 1", - site: "https://example.com/place1", - iso: "NL", - city: "Amsterdam" + id: '1', + name: 'Place 1', + address: 'Address 1', + site: 'https://example.com/place1', + iso: 'NL', + city: 'Amsterdam' }, { - id: "2", - name: "Place 2", - address: "Address 2", - iso: "DE", - city: "Berlin" + id: '2', + name: 'Place 2', + address: 'Address 2', + iso: 'DE', + city: 'Berlin' }, { - id: "3", - name: "Place 3", - address: "Address 3", - iso: "IT", - city: "Milan" + id: '3', + name: 'Place 3', + address: 'Address 3', + iso: 'IT', + city: 'Milan' }, { - id: "4", - name: "Place 4", - address: "Address 4", - site: "https://example.com/place4", - iso: "NL", - city: "Rotterdam" + id: '4', + name: 'Place 4', + address: 'Address 4', + site: 'https://example.com/place4', + iso: 'NL', + city: 'Rotterdam' }, { - id: "5", - name: "Place 5", - address: "Address 5", - iso: "DE", - city: "Berlin" + id: '5', + name: 'Place 5', + address: 'Address 5', + iso: 'DE', + city: 'Berlin' }, { - id: "6", - name: "Place 6", - address: "Address 6", - iso: "IT", - city: "Reggio Emilia" + id: '6', + name: 'Place 6', + address: 'Address 6', + iso: 'IT', + city: 'Reggio Emilia' }, { - id: "7", - name: "Place 7", - address: "Address 7", - site: "https://example.com/place7", - iso: "NL", - city: "Amsterdam" + id: '7', + name: 'Place 7', + address: 'Address 7', + site: 'https://example.com/place7', + iso: 'NL', + city: 'Amsterdam' }, { - id: "8", - name: "Place 8", - address: "Address 8", - iso: "DE", - city: "Berlin" + id: '8', + name: 'Place 8', + address: 'Address 8', + iso: 'DE', + city: 'Berlin' }, { - id: "9", - name: "Place 9", - address: "Address 9", - iso: "IT", - city: "Milan" + id: '9', + name: 'Place 9', + address: 'Address 9', + iso: 'IT', + city: 'Milan' }, { - id: "10", - name: "Place 10", - address: "Address 10", - site: "https://example.com/place10", - iso: "NL", - city: "Amsterdam" + id: '10', + name: 'Place 10', + address: 'Address 10', + site: 'https://example.com/place10', + iso: 'NL', + city: 'Amsterdam' }, { - id: "11", - name: "Place 11", - address: "Address 11", - site: "https://example.com/place11", - iso: "NL", - city: "Amsterdam" + id: '11', + name: 'Place 11', + address: 'Address 11', + site: 'https://example.com/place11', + iso: 'NL', + city: 'Amsterdam' }, { - id: "12", - name: "Place 12", - address: "Address 12", - iso: "DE", - city: "Berlin" + id: '12', + name: 'Place 12', + address: 'Address 12', + iso: 'DE', + city: 'Berlin' }, { - id: "13", - name: "Place 13", - address: "Address 13", - iso: "IT", - city: "Reggio Emilia" + id: '13', + name: 'Place 13', + address: 'Address 13', + iso: 'IT', + city: 'Reggio Emilia' } ]) db.createCollection('ua-isos') db['ua-isos'].insert([ { - DE: "Germany", - IT: "Italy", - NL: "Netherlands" + DE: 'Germany', + IT: 'Italy', + NL: 'Netherlands' } ]) diff --git a/tsconfig.json b/tsconfig.json index 1c910fe..89d6690 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -31,7 +31,9 @@ }, "exclude": ["node_modules"], "include": [ + "scripts/", ".next/types/**/*.ts", + "eslint.config.js", "next-env.d.ts", "next.config.mjs", "vitest.setup.mts",