Skip to content

Commit

Permalink
feat: set type:module in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorzpokorski committed Jun 17, 2024
1 parent 442799b commit 269fe00
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 39 deletions.
30 changes: 0 additions & 30 deletions .eslintrc.js

This file was deleted.

34 changes: 34 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://json.schemastore.org/eslintrc.json",
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"next",
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier"
],
"parserOptions": {
"project": ["tsconfig.json"]
},
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": [
"build/",
"dist/",
"node_modules/",
"*.js",
"*.jsx",
"bin"
],
"rules": {
"@next/next/no-html-link-for-pages": "off",
"@typescript-eslint/consistent-type-imports": "error"
}
}
4 changes: 2 additions & 2 deletions .lintstagedrc.js → .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const path = require("path");
import path from 'path';

const buildEslintCommand = (filenames) =>
`next lint --fix --file ${filenames
.map((f) => path.relative(process.cwd(), f))
.join(" --file ")}`;

module.exports = {
export default {
"*.{js,jsx,ts,tsx}": [buildEslintCommand],
"*.{js,jsx,ts,tsx,md,mdx,graphql,yml,yaml,css,scss,json}": `prettier --write --ignore-unknown`,
};
2 changes: 1 addition & 1 deletion next.config.js → next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ const nextConfig = {
},
};

module.exports = nextConfig;
export default nextConfig;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "grzegorzpokorski.pl",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev",
"build": "next build",
Expand Down
6 changes: 0 additions & 6 deletions postcss.config.js

This file was deleted.

9 changes: 9 additions & 0 deletions postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

export default config;

0 comments on commit 269fe00

Please sign in to comment.