Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pnpm lint
pnpm dlx lint-staged
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@nciocpl:registry=https://npm.pkg.github.com
engine-strict=true
legacy-peer-deps=true
11 changes: 11 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import { defineConfig } from "eslint/config";

export default defineConfig([
{ files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
]);
10 changes: 10 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default {
// Lint & Prettify TS and JS files
'*.{ts,tsx,js,jsx}': (filenames) => [
`eslint --fix ${filenames.join(' ')}`,
`prettier --write ${filenames.join(' ')}`,
],
// Prettify only Markdown and JSON files
'*.{md,json,css,scss}': (filenames) =>
`prettier --write ${filenames.join(' ')}`,
};
23 changes: 16 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"format:check": "prettier --check 'src/**/*.{ts,tsx,scss,css,md}'",
"storybook:build": "storybook build",
"typecheck": "tsc --noEmit",
"prepublishOnly": "npm run build"
"prepare": "husky",
"prepublishOnly": "pnpm build"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -73,6 +74,8 @@
},
"devDependencies": {
"@changesets/cli": "^2.27.0",
"@eslint/js": "^9.39.2",
"@nciocpl/eslint-config-react": "^1.1.0-alpha.1",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-typescript": "^12.1.0",
Expand All @@ -85,25 +88,31 @@
"@types/jest": "^29.5.0",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"eslint": "^8.57.0",
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
"eslint": "^9.39.2",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^17.3.0",
"husky": "^9.1.7",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^16.2.7",
"postcss-modules": "^6.0.0",
"prettier": "^3.4.0",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"rollup": "^4.28.0",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-scss": "^4.0.0",
"postcss-modules": "^6.0.0",
"sass": "^1.82.0",
"storybook": "^8.4.0",
"ts-jest": "^29.2.0",
"typescript": "^5.7.0"
"typescript": "^5.7.0",
"typescript-eslint": "^8.54.0"
},
"engines": {
"node": ">=18.0.0"
Expand Down