Skip to content

add: Format and linting#4

Merged
pyropy merged 6 commits into
mainfrom
add/formatting-and-linting
Jun 3, 2025
Merged

add: Format and linting#4
pyropy merged 6 commits into
mainfrom
add/formatting-and-linting

Conversation

@pyropy

@pyropy pyropy commented May 30, 2025

Copy link
Copy Markdown
Contributor

Setup prettier, eslint & neostandard formatting and linting. Repository is using standard checkernetwork prettier config.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 30, 2025

Copy link
Copy Markdown

Deploying filcdn-dashboard with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3868c2e
Status: ✅  Deploy successful!
Preview URL: https://3e41932b.filcdn-dashboard.pages.dev
Branch Preview URL: https://add-formatting-and-linting.filcdn-dashboard.pages.dev

View logs

@bajtos bajtos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .prettierrc Outdated
{
"singleQuote": true,
"semi": false
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out, should be okay now. I've added both prettier config and neostandard.

Comment thread package.json
"@checkernetwork/prettier-config": "^1.0.1",
"eslint": "^9.28.0",
"neostandard": "^0.12.1",
"prettier": "^3.5.3",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also use "@checkernetwork/prettier-config" here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so -- Miro has suggested it in his review

#4 (comment)

@juliangruber juliangruber removed their request for review June 3, 2025 12:23
@pyropy pyropy merged commit 774bb6a into main Jun 3, 2025
3 checks passed
Comment thread eslint.config.js
export default neostandard({
noStyle: true, // Disable style-related rules, we use Prettier
ts: false,
env: ['mocha'],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we are not using Mocha for unit tests, in which case this line should be removed.

Comment thread package.json
"lint": "eslint & prettier --check .",
"lint:fix": "eslint --fix & prettier --write .",
"observable": "observable",
"test": "prettier --check ."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

"test": "npm run lint"

(We want to run both prettier & eslint.)

Comment thread package.json
Comment on lines +26 to +28
"prettier-plugin-jsdoc": "^1.3.2",
"prettier-plugin-multiline-arrays": "^4.0.3",
"prettier-plugin-packagejson": "^2.5.15",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we don't need these dependencies, @checkernetwork/prettier-config includes them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants