-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(repo): convert entire workspace to use ES modules
- Loading branch information
1 parent
2d2c3c4
commit 3c29cff
Showing
21 changed files
with
182 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
const { FlatCompat } = require('@eslint/eslintrc') | ||
const js = require('@eslint/js') | ||
const baseConfigPromise = require('../../eslint.config.js') | ||
// TODO: merge with antfu eslint config | ||
// const { FlatCompat } = require('@eslint/eslintrc'); | ||
import baseConfigPromise from '../../eslint.config.js' | ||
|
||
module.exports = (async () => { | ||
export default (async () => { | ||
const baseConfig = await baseConfigPromise | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
}) | ||
|
||
return [ | ||
...baseConfig, | ||
...compat.extends('plugin:playwright/recommended'), | ||
{ | ||
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], | ||
rules: {}, | ||
}, | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
rules: {}, | ||
}, | ||
{ | ||
files: ['**/*.js', '**/*.jsx'], | ||
rules: {}, | ||
}, | ||
{ | ||
files: ['src/**/*.{ts,js,tsx,jsx}'], | ||
rules: {}, | ||
}, | ||
// ...compat.extends("plugin:playwright/recommended"), | ||
// The following configurations are commented out | ||
// ...compat.extends( | ||
// 'plugin:@nx/react-typescript', | ||
// 'next', | ||
// 'next/core-web-vitals' | ||
// ), | ||
// { | ||
// files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], | ||
// rules: { | ||
// '@next/next/no-html-link-for-pages': ['error', 'apps/portal/pages'], | ||
// }, | ||
// }, | ||
// { | ||
// files: ['**/*.ts', '**/*.tsx'], | ||
// rules: {}, | ||
// }, | ||
// { | ||
// files: ['**/*.js', '**/*.jsx'], | ||
// rules: {}, | ||
// }, | ||
// ...compat.config({ env: { jest: true } }).map((config) => ({ | ||
// ...config, | ||
// files: ['**/*.spec.ts', '**/*.spec.tsx', '**/*.spec.js', '**/*.spec.jsx'], | ||
// rules: { | ||
// ...config.rules, | ||
// }, | ||
// })), | ||
// { ignores: ['.next/**/*'] }, | ||
] | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,37 @@ | ||
// import type { Config } from 'tailwindcss' | ||
// const { fontFamily } = require('tailwindcss/defaultTheme') | ||
const { join } = require('node:path') | ||
import { join } from 'node:path' | ||
|
||
const { createPreset } = require('fumadocs-ui/tailwind-plugin') | ||
import { createPreset } from 'fumadocs-ui/tailwind-plugin' | ||
|
||
const { createGlobPatternsForDependencies } = require('@nx/react/tailwind') | ||
import { createGlobPatternsForDependencies } from '@nx/react/tailwind' | ||
|
||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
darkMode: ['class'], | ||
content: [ | ||
join( | ||
__dirname, | ||
'{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}', | ||
), | ||
...createGlobPatternsForDependencies(__dirname), | ||
'./mdx-components.tsx', | ||
'../../node_modules/fumadocs-ui/dist/**/*.js', | ||
], | ||
theme: { | ||
extend: { | ||
fontFamily: { | ||
// sans: ['var(--font-geist-sans)', ...fontFamily.sans], | ||
}, | ||
export const darkMode = ['class'] | ||
export const content = [ | ||
join( | ||
__dirname, | ||
'{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}', | ||
), | ||
...createGlobPatternsForDependencies(__dirname), | ||
'./mdx-components.tsx', | ||
'../../node_modules/fumadocs-ui/dist/**/*.js', | ||
] | ||
export const theme = { | ||
extend: { | ||
fontFamily: { | ||
// sans: ['var(--font-geist-sans)', ...fontFamily.sans], | ||
}, | ||
}, | ||
presets: [ | ||
createPreset({ | ||
// preset: 'default', | ||
// preset: 'neutral', | ||
// preset: 'dusk', | ||
// preset: 'purple', | ||
// preset: 'ocean', | ||
preset: 'catppuccin', | ||
}), | ||
], | ||
plugins: [], | ||
} | ||
export const presets = [ | ||
createPreset({ | ||
// preset: 'default', | ||
// preset: 'neutral', | ||
// preset: 'dusk', | ||
// preset: 'purple', | ||
// preset: 'ocean', | ||
preset: 'catppuccin', | ||
}), | ||
] | ||
export const plugins = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
const { FlatCompat } = require('@eslint/eslintrc') | ||
const js = require('@eslint/js') | ||
const baseConfigPromise = require('../../eslint.config.js') | ||
// TODO: merge with antfu eslint config | ||
// const { FlatCompat } = require('@eslint/eslintrc'); | ||
import baseConfigPromise from '../../eslint.config.js' | ||
|
||
module.exports = (async () => { | ||
export default (async () => { | ||
const baseConfig = await baseConfigPromise | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
}) | ||
|
||
return [ | ||
...baseConfig, | ||
...compat.extends('plugin:playwright/recommended'), | ||
{ | ||
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], | ||
rules: {}, | ||
}, | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
rules: {}, | ||
}, | ||
{ | ||
files: ['**/*.js', '**/*.jsx'], | ||
rules: {}, | ||
}, | ||
{ | ||
files: ['src/**/*.{ts,js,tsx,jsx}'], | ||
rules: {}, | ||
}, | ||
// ...compat.extends("plugin:playwright/recommended"), | ||
// The following configurations are commented out | ||
// ...compat.extends( | ||
// 'plugin:@nx/react-typescript', | ||
// 'next', | ||
// 'next/core-web-vitals' | ||
// ), | ||
// { | ||
// files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], | ||
// rules: { | ||
// '@next/next/no-html-link-for-pages': ['error', 'apps/portal/pages'], | ||
// }, | ||
// }, | ||
// { | ||
// files: ['**/*.ts', '**/*.tsx'], | ||
// rules: {}, | ||
// }, | ||
// { | ||
// files: ['**/*.js', '**/*.jsx'], | ||
// rules: {}, | ||
// }, | ||
// ...compat.config({ env: { jest: true } }).map((config) => ({ | ||
// ...config, | ||
// files: ['**/*.spec.ts', '**/*.spec.tsx', '**/*.spec.js', '**/*.spec.jsx'], | ||
// rules: { | ||
// ...config.rules, | ||
// }, | ||
// })), | ||
// { ignores: ['.next/**/*'] }, | ||
] | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
const { join } = require('node:path') | ||
const { createGlobPatternsForDependencies } = require('@nx/react/tailwind') | ||
import { join } from 'node:path' | ||
import { createGlobPatternsForDependencies } from '@nx/react/tailwind' | ||
|
||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: [ | ||
join( | ||
__dirname, | ||
'{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}', | ||
), | ||
...createGlobPatternsForDependencies(__dirname), | ||
], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
export const content = [ | ||
join( | ||
__dirname, | ||
'{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}', | ||
), | ||
...createGlobPatternsForDependencies(__dirname), | ||
] | ||
export const theme = { | ||
extend: {}, | ||
} | ||
export const plugins = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.