Skip to content

Commit 3ac70cb

Browse files
feat: add prettier, husky
1 parent 69102da commit 3ac70cb

35 files changed

+1761
-369
lines changed

.eslintrc.cjs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// eslint-disable-next-line @typescript-eslint/no-var-requires
2+
const path = require('path');
3+
4+
/** @type {import('eslint').Linter.Config} */
5+
const config = {
6+
overrides: [
7+
{
8+
extends: [
9+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
10+
],
11+
files: ['*.ts', '*.tsx'],
12+
parserOptions: {
13+
project: path.join(__dirname, 'tsconfig.json'),
14+
},
15+
},
16+
],
17+
parser: '@typescript-eslint/parser',
18+
parserOptions: {
19+
project: path.join(__dirname, 'tsconfig.json'),
20+
},
21+
plugins: ['@typescript-eslint', 'prettier'],
22+
extends: [
23+
'next/core-web-vitals',
24+
'plugin:@typescript-eslint/recommended',
25+
'eslint:recommended',
26+
'plugin:react/recommended',
27+
'plugin:prettier/recommended',
28+
],
29+
rules: {
30+
'@typescript-eslint/consistent-type-imports': [
31+
'warn',
32+
{
33+
prefer: 'type-imports',
34+
fixStyle: 'inline-type-imports',
35+
},
36+
],
37+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
38+
'@typescript-eslint/explicit-function-return-type': 'off',
39+
'@typescript-eslint/explicit-module-boundary-types': 'off',
40+
'react/react-in-jsx-scope': 'off',
41+
'react/prop-types': 'off',
42+
'@typescript-eslint/no-explicit-any': 'off',
43+
'no-unused-vars': 'warn',
44+
},
45+
};
46+
47+
module.exports = config;

.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.prettierignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ignore artifacts:
2+
.next
3+
4+
# Lock files
5+
yarn.lock
6+
package-lock.json
7+
pnpm-lock.yaml
8+
9+
.git
10+
node_modules
11+

.prettierrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"trailingComma": "es5",
3+
"semi": true,
4+
"tabWidth": 2,
5+
"singleQuote": true,
6+
"jsxSingleQuote": true,
7+
"plugins": ["prettier-plugin-tailwindcss"]
8+
}

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# Postgres AI Playground
22

33
![Cover image](https://github.com/m-abdelwahab/postgres-ai-playground/assets/27310414/05e1939f-af0c-4c77-b2db-1b71b09f9199)
4-

next.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/** @type {import('next').NextConfig} */
2-
const nextConfig = {}
2+
const nextConfig = {};
33

4-
module.exports = nextConfig
4+
module.exports = nextConfig;

0 commit comments

Comments
 (0)