Skip to content

Use biome as linter #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 44 commits into
base: migrate-to-turbo-and-pnpm
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2ab9a7a
fix: add status icon
junogueira Apr 19, 2023
c9a5705
fix: show reminder date and time
junogueira Apr 19, 2023
a7447b0
fix: style status property values
junogueira Apr 22, 2023
cb08feb
fix: board view when grouped by status
junogueira Apr 29, 2023
58dad3d
fix: board view when grouped by status group instead of status option
junogueira Apr 30, 2023
131ebb3
fix: the notion-external-mention svg icon is displayed abnormally on …
chuyun May 22, 2023
7c5253e
Merge pull request #486 from chuyun/master
transitive-bullshit May 22, 2023
7aa5d0e
fix: mention-preview-card
May 30, 2023
89d1fca
setting app-element in react-modal Modal component
s4nju Jun 4, 2023
bcfb086
fix: time for firefox and safari browser
s4nju Jun 4, 2023
2a6877a
fixed typeform auto focus issue
s4nju Jun 4, 2023
898f54d
Merge pull request #496 from s4nju/fix/55_typeform_focus
transitive-bullshit Jun 4, 2023
42da5f3
Merge pull request #494 from s4nju/add_app_element
transitive-bullshit Jun 4, 2023
0583280
Merge pull request #495 from s4nju/fix/time_firefox_safari
transitive-bullshit Jun 4, 2023
9fed624
feature: added replit support as embed
s4nju Jun 5, 2023
c071c03
- log
stefanfeldner Jun 14, 2023
1d42f45
Merge pull request #499 from stefanfeldner/hotfix/remove-log
transitive-bullshit Jun 18, 2023
a12191d
Merge pull request #497 from s4nju/feat/add_replit_support
transitive-bullshit Jun 18, 2023
3bf600d
Merge pull request #472 from junogueira/fix/show-reminder-date-time
transitive-bullshit Jun 18, 2023
0dd9271
Merge pull request #471 from junogueira/fix/add-status-icon
transitive-bullshit Jun 18, 2023
fea0d2f
Merge pull request #493 from chuyun/master
transitive-bullshit Jun 18, 2023
f7daab7
fix broken search function
Armster15 Jul 7, 2023
5cfdd6f
fix: the eoi component displays an exception under the block type
chuyun Jul 13, 2023
3aba73c
Merge pull request #505 from Armster15/master
transitive-bullshit Aug 8, 2023
fb701d5
skip pages which is not alive.
ulion Aug 25, 2023
9e1e7cb
v6.16.1
normdoow Oct 3, 2023
5d866c4
trigger build and publish
normdoow Oct 3, 2023
7526d98
Merge pull request #523 from NotionX/trigger-version
normdoow Oct 3, 2023
e1f03de
v6.16.2
normdoow Oct 3, 2023
28f5300
feat: add card_cover_position to collection card
mfts Oct 3, 2024
c862db0
Merge pull request #563 from papermark/feat/collection-card
transitive-bullshit Oct 3, 2024
b6afe49
Merge pull request #507 from chuyun/feature/eoi-fix
transitive-bullshit Oct 3, 2024
3e8b41b
Merge pull request #514 from ulion/feature/fix_nonalive_page_issue
transitive-bullshit Oct 5, 2024
479e73e
Merge migrate-to-turbo-and-pnpm branch
onnimonni Oct 30, 2024
1185eb3
Use versions from the pnpm workspace instead of forcing them to be lo…
onnimonni Oct 30, 2024
4c9a59c
Replace yarn with pnpm in github actions
onnimonni Oct 30, 2024
3fae83f
Use newer version of actions/setup-node to support pnpm
onnimonni Oct 30, 2024
d1298a7
Update to newer version of node
onnimonni Oct 30, 2024
f2144f8
Github action: Install pnpm before installing node packages
onnimonni Oct 30, 2024
2d13507
Fix ava test to work properly with turbo and update ava
onnimonni Oct 30, 2024
943c1da
Enable project tool versions to be used with mise
onnimonni Oct 30, 2024
ca3505d
Enable Biome and fix all of the issues it was giving. FIXME: Enable a…
onnimonni Oct 30, 2024
40367b4
Replace the last places where we used ESLint with Biome
onnimonni Oct 30, 2024
1033683
Update pnpm
onnimonni Oct 30, 2024
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
27 changes: 0 additions & 27 deletions .eslintrc.json

This file was deleted.

76 changes: 50 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,90 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version: 16
cache: yarn
version: 9
run_install: false

- run: yarn install --frozen-lockfile
- run: yarn test
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

- run: pnpm install --frozen-lockfile
- run: pnpm test

build-minimal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
cache: yarn
node-version: 18
cache: pnpm

- run: yarn install --frozen-lockfile
- run: yarn build
- run: pnpm install --frozen-lockfile
- run: pnpm build

- name: Build minimal example
run: |
cd examples/minimal
yarn build
pnpm build

build-full:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version: 16
cache: yarn
version: 9
run_install: false

- run: yarn install --frozen-lockfile
- run: yarn build
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

- run: pnpm install --frozen-lockfile
- run: pnpm build

- name: Build full example
run: |
cd examples/full
yarn build
pnpm build

# TODO: using the official API with GitHub Actions results in too much rate
# limiting and false negative build failures, so we're disabling it for now.
# build-full-official-api:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4

# - uses: pnpm/action-setup@v4
# name: Install pnpm
# with:
# version: 9
# run_install: false

# - uses: actions/setup-node@v3
# - uses: actions/setup-node@v4
# with:
# node-version: 16
# cache: yarn
# cache: pnpm

# - run: yarn install --frozen-lockfile
# - run: yarn build
# - run: pnpm install --frozen-lockfile
# - run: pnpm build

# - name: Build full example using the official Notion API

Expand All @@ -75,4 +99,4 @@ jobs:

# run: |
# cd examples/full
# yarn build
# pnpm build
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ build
dist
types

# Typescript builds
packages/*/.tsimp

# misc
.DS_Store
.env
Expand Down
17 changes: 17 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tools]
# There was a moment when Notion search API was broken
# It was fixed directly in react-notion-x dependency
# When trying to replace the dependency I tried to run
# $ brew install vips
# $ yarn add https://github.com/NotionX/react-notion-x#v6.16.2
# There's weird errors if one is building react-notion-x directly from github
# 'ValueError: invalid mode: 'rU' while trying to load binding.gyp'
# These should be fixed by downgrading python to 3.10
# Source: https://stackoverflow.com/a/74732671
python = ['3.10']

# The node-gyp module doesn't work properly when using node 20
# TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
# See more: https://stackoverflow.com/a/77910474/1337062
node = ['20']
"npm:pnpm" = '8.11.0'
63 changes: 63 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": []
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "off",
"noImplicitAnyLet": "off",
"noArrayIndexKey": "off",
"noDuplicateFontNames": "off"
},
"a11y": {
"useAltText": "off",
"useKeyWithClickEvents": "off",
"useFocusableInteractive": "off",
"useMediaCaption": "off",
"noSvgWithoutTitle": "off",
"useGenericFontNames": "off",
"useButtonType": "off",
"useSemanticElements": "off"
},
"correctness": {
"useExhaustiveDependencies": "off",
"noConstantCondition": "off"
},
"style": {
"noParameterAssign": "off",
"noNonNullAssertion": "off"
},
"performance": {
"noAccumulatingSpread": "off"
},
"security": {
"noDangerouslySetInnerHtml": "off"
},
"complexity": {
"noForEach": "off"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
}
70 changes: 30 additions & 40 deletions examples/cra/package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,32 @@
{
"name": "notion-x-example-cra",
"version": "6.16.0",
"private": true,
"scripts": {
"start": "GENERATE_SOURCEMAP=false react-scripts start",
"build": "GENERATE_SOURCEMAP=false react-scripts build",
"dev": "GENERATE_SOURCEMAP=false react-scripts start",
"eject": "GENERATE_SOURCEMAP=false react-scripts eject",
"lint": "eslint \"src/**/*.ts*\"",
"clean": "rm -rf build"
},
"dependencies": {
"@types/node": "^16.11.26",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
"notion-types": "workspace:*",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-notion-x": "workspace:*",
"react-scripts": "5.0.0",
"typescript": "^4.6.3"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
"name": "notion-x-example-cra",
"version": "6.16.1",
"private": true,
"scripts": {
"start": "GENERATE_SOURCEMAP=false react-scripts start",
"build": "GENERATE_SOURCEMAP=false react-scripts build",
"dev": "GENERATE_SOURCEMAP=false react-scripts start",
"eject": "GENERATE_SOURCEMAP=false react-scripts eject",
"lint": "biome check",
"clean": "rm -rf build"
},
"dependencies": {
"@types/node": "^16.11.26",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
"notion-types": "workspace:*",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-notion-x": "workspace:*",
"react-scripts": "5.0.0",
"typescript": "^4.6.3"
},
"browserslist": {
"production": [">0.2%", "not dead", "not op_mini all"],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
46 changes: 23 additions & 23 deletions examples/cra/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
Loading
Loading