Merge pull request 'Add sqlite3 and modify prettier config' (#10) from j285he-add-sqlite3 into main
Reviewed-on: #10
This commit is contained in:
commit
3ed6d703a9
|
@ -0,0 +1,57 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ["./tsconfig.json"],
|
||||
},
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings",
|
||||
"plugin:import/typescript",
|
||||
"plugin:react/recommended",
|
||||
"plugin:prettier/recommended",
|
||||
],
|
||||
plugins: ["@typescript-eslint", "react", "prettier"],
|
||||
rules: {
|
||||
"prettier/prettier": "error",
|
||||
|
||||
"import/first": "error",
|
||||
"import/order": [
|
||||
"error",
|
||||
{
|
||||
"newlines-between": "always",
|
||||
"alphabetize": {
|
||||
"order": "asc",
|
||||
"caseInsensitive": true,
|
||||
},
|
||||
"pathGroups": [
|
||||
{
|
||||
"pattern": "@/**",
|
||||
"group": "external",
|
||||
"position": "after",
|
||||
},
|
||||
{
|
||||
"pattern": "./*.css",
|
||||
"group": "index",
|
||||
"position": "after",
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
"react/prop-types": "off",
|
||||
|
||||
// Turn off these rules
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"import/no-unresolved": "off",
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: "detect",
|
||||
},
|
||||
},
|
||||
};
|
|
@ -1,53 +0,0 @@
|
|||
parser: '@typescript-eslint/parser'
|
||||
parserOptions:
|
||||
project: ./tsconfig.json
|
||||
|
||||
root: true
|
||||
|
||||
plugins:
|
||||
- '@typescript-eslint'
|
||||
- prettier
|
||||
|
||||
extends:
|
||||
- eslint:recommended
|
||||
- plugin:@typescript-eslint/eslint-recommended
|
||||
- plugin:@typescript-eslint/recommended
|
||||
- plugin:import/errors
|
||||
- plugin:import/warnings
|
||||
- plugin:import/typescript
|
||||
- prettier
|
||||
- plugin:prettier/recommended
|
||||
|
||||
rules:
|
||||
quotes:
|
||||
- error
|
||||
- single
|
||||
- avoidEscape: true
|
||||
|
||||
no-console: warn
|
||||
|
||||
'@typescript-eslint/explicit-member-accessibility':
|
||||
- error
|
||||
- accessibility: no-public
|
||||
|
||||
import/first: warn
|
||||
import/order:
|
||||
- warn
|
||||
- newlines-between: always
|
||||
alphabetize:
|
||||
order: asc
|
||||
caseInsensitive: true
|
||||
|
||||
import/no-duplicates: off
|
||||
no-duplicate-imports: off
|
||||
'@typescript-eslint/no-duplicate-imports': warn
|
||||
|
||||
'@typescript-eslint/explicit-function-return-type': off
|
||||
'@typescript-eslint/explicit-module-boundary-types': off
|
||||
'@typescript-eslint/no-explicit-any': off
|
||||
'@typescript-eslint/no-non-null-assertion': off
|
||||
'@typescript-eslint/no-use-before-define': off
|
||||
|
||||
# Enabled in tsconfig
|
||||
'@typescript-eslint/no-unused-vars': off
|
||||
import/no-unresolved: off
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"arrowParens": "avoid",
|
||||
"singleQuote": true,
|
||||
"semi": false,
|
||||
"printWidth": 80,
|
||||
"trailingComma": "all",
|
||||
"bracketSpacing": false
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
module.exports = {
|
||||
reactStrictMode: true,
|
||||
}
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -11,7 +11,8 @@
|
|||
"dependencies": {
|
||||
"next": "12.0.1",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
"react-dom": "17.0.2",
|
||||
"sqlite3": "^5.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.11.6",
|
||||
|
@ -22,6 +23,7 @@
|
|||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-react": "^7.27.0",
|
||||
"prettier": "^2.4.1",
|
||||
"typescript": "4.4.4"
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import type { AppProps } from 'next/app'
|
||||
import type { AppProps } from "next/app";
|
||||
import React from "react";
|
||||
|
||||
function App({ Component, pageProps }: AppProps) {
|
||||
return <Component {...pageProps} />
|
||||
return <Component {...pageProps} />;
|
||||
}
|
||||
|
||||
export default App
|
||||
export default App;
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
import type { NextPage } from 'next'
|
||||
|
||||
|
||||
import type { NextPage } from "next";
|
||||
import React from "react";
|
||||
|
||||
const Home: NextPage = () => {
|
||||
return (
|
||||
<main>I am a book</main>
|
||||
)
|
||||
}
|
||||
return <main>I am a book</main>;
|
||||
};
|
||||
|
||||
export default Home
|
||||
export default Home;
|
||||
|
|
|
@ -5,11 +5,7 @@
|
|||
"target": "ES6",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"noEmit": true,
|
||||
|
@ -38,12 +34,6 @@
|
|||
"forceConsistentCasingInFileNames": true,
|
||||
"allowJs": true
|
||||
},
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
"include": ["next-env.d.ts", "types.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
declare module "sqlite3";
|
Loading…
Reference in New Issue