Skip to content

Commit

Permalink
chore: Updated ESLint file and made some pages ESLint compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
FleetAdmiralJakob committed Jan 5, 2024
1 parent deb69c5 commit 12b46d9
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 32 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,10 @@ yarn-error.log*
/apps/web/public/sw.js.map
/apps/web/public/workbox-*.js
/apps/web/public/workbox-*.js.map
/apps/web/public/fallback-*.js
/apps/web/public/fallback-*.js

# Playwright
test-results
playwright-report
blob-report
playwright/.cache
1 change: 0 additions & 1 deletion apps/web/src/pages/contact/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ const ContactUs = () => {
<input
className="h-10 w-full rounded-md bg-[#d7d5db] pl-2"
id="firstname"
autoFocus
{...register("firstName")}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/locationsettings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { StaticImport } from "next/dist/shared/lib/get-img-props";
import React, { useEffect, useRef, useState } from "react";
import { StaticImport } from "next/dist/shared/lib/get-img-props";
import Image from "next/image";
import { observer } from "@legendapp/state/react";
import cn from "classnames";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/search/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { StaticImport } from "next/dist/shared/lib/get-img-props";
import React, { useEffect, useRef, useState } from "react";
import { StaticImport } from "next/dist/shared/lib/get-img-props";
import Head from "next/head";
import Image from "next/image";
import { useRouter } from "next/router";
Expand Down
55 changes: 28 additions & 27 deletions tooling/eslint/base.js
Original file line number Diff line number Diff line change
@@ -1,44 +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",
"next/core-web-vitals",
"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'
"**/*.config.js",
"**/*.config.cjs",
"**/.eslintrc.cjs",
".next",
"dist",
"pnpm-lock.yaml",
],
reportUnusedDisableDirectives: true
}
reportUnusedDisableDirectives: true,
};

module.exports = config
module.exports = config;
2 changes: 1 addition & 1 deletion tooling/typescript/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ESNext",
"lib": ["dom", "dom.iterable", "ES2022"],
"lib": ["dom", "dom.iterable", "ESNext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand Down

0 comments on commit 12b46d9

Please sign in to comment.