Skip to content

Commit

Permalink
refactor(config): styleguide as esmodule
Browse files Browse the repository at this point in the history
  • Loading branch information
csantiago132 committed Dec 9, 2024
1 parent 860e43d commit 93851a7
Show file tree
Hide file tree
Showing 14 changed files with 1,028 additions and 1,009 deletions.
6 changes: 1 addition & 5 deletions .prettierrc.cjs → .commitlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@
*
* Explore our open-source projects: {@link https://github.com/kurocado-studio}
*/

module.exports = {
plugins: ['prettier-plugin-tailwindcss'],
...require('@kurocado-studio/styleguide/prettier'),
};
export { commitLintConfig as default } from '@kurocado-studio/styleguide';
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

41 changes: 0 additions & 41 deletions .eslintrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package-lock.json
package.json
pnpm-lock.yaml
.codesandbox
5 changes: 5 additions & 0 deletions app/glodal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@ declare module '*.webp' {
const value: string;
export default value;
}

declare module '*.json' {
const value: any;
export default value;
}
20 changes: 5 additions & 15 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,9 @@ import {
} from '@remix-run/react';
import React from 'react';

import stylesheet from '~/tailwind.css?url';
import '~/tailwind.css';

export const links: LinksFunction = () => [
{ rel: 'stylesheet', href: stylesheet },
{
rel: 'icon',
type: 'image/png',
sizes: '32x32',
href: '/favicon-32x32.png',
},
{
rel: 'icon',
type: 'image/png',
sizes: '16x16',
href: '/favicon-16x16.png',
},
{
rel: 'icon',
type: 'image/x-icon',
Expand All @@ -62,7 +49,10 @@ export function Layout({
<Links />
<title>Welcome to Remix</title>
</head>
<body className='selection:bg-lime-200 selection:text-[#f52891cc]'>
<body
className='selection:bg-lime-200 selection:text-[#f52891cc]'
data-testid='root-body-test-id'
>
{children}
<ScrollRestoration />
<Scripts />
Expand Down
44 changes: 44 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Made with ❤️ and adobo by Kurocado Studio
* Copyright (c) 2024. All Rights Reserved.
*
* Learn more about Kurocado Studio: {@link https://www.kurocado.studio}
*
* Explore our open-source projects: {@link https://github.com/kurocado-studio}
*/
import {
eslintBrowserConfig,
eslintReactConfig,
} from '@kurocado-studio/styleguide';
import { defineConfig } from 'eslint-define-config';

export default defineConfig([
...eslintBrowserConfig,
...eslintReactConfig,
{
files: ['*.{ts, tsx}'],
settings: {
'import/resolver': {
alias: {
map: [['~', './app']],
},
typescript: {
project: './tsconfig.json',
},
node: {},
},
},
},
{
files: ['vite.config.ts', 'postcss.config.mjs'],
rules: {
'import/default': 'off',
'import/named': 'off',
'import/namespace': 'off',
'import/no-cycle': 'off',
'import/no-default-export': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
},
},
]);
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "remix vite:build",
"commitlint": "pnpm exec commitlint --edit",
"dev": "remix vite:dev",
"eslint-check": "eslint --max-warnings=0 .",
"eslint-check": "eslint --max-warnings=0 . --debug",
"eslint-fix": "eslint --max-warnings=0 . --fix",
"lint": "eslint --max-warnings=0 .",
"prepare": "husky install",
Expand All @@ -20,10 +20,9 @@
"typecheck": "tsc"
},
"dependencies": {
"@kurocado-studio/styleguide": "1.2.5",
"@remix-run/node": "^2.9.2",
"@remix-run/react": "^2.9.2",
"@remix-run/serve": "^2.9.2",
"@typescript-eslint/parser": "^8.17.0",
"isbot": "^5.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -34,10 +33,13 @@
"@commitlint/cli": "^19.0.3",
"@commitlint/config-conventional": "^19.0.3",
"@flydotio/dockerfile": "^0.5.9",
"@kurocado-studio/styleguide": "1.4.0",
"@remix-run/dev": "^2.8.1",
"@remix-run/serve": "^2.9.2",
"@types/react-dom": "^18.3.1",
"autoprefixer": "^10.4.18",
"eslint": "^8.57.0",
"eslint": "^9.16.0",
"eslint-define-config": "^2.1.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.10",
"postcss": "^8.4.35",
Expand Down
Loading

0 comments on commit 93851a7

Please sign in to comment.