1.7.0 ā€¢ Published 3 months ago

antistatique-frontend v1.7.0

Weekly downloads
3
License
MIT
Repository
github
Last release
3 months ago

āœ… Antistatique Frontend Development Configuration

Antistatique truth source and opinionated configuration.

If you're just to lazy to read the README šŸ˜šŸ‘‰ bun x antistatique-frontend@latest

Others resources

Currently provides:

Table of content

What it does

  • Lints TypeScript and CSS based on the latest standards
  • Manage pre-commit git hook to prevent šŸ’© commits
  • Ensure decent code quality at Antistatique
  • Provide dev-ready testing environement (+ Github Actions)

How to use

Requirement:

First, create your project using the dedicated scaffolding tool for your project's technologies. Here are some usefull commands that you can use :

$ bun x -p antistatique-frontend@latest next # Cool, right? Then choose to keep src/_app (as src/app) or src/_pages (as src/pages) depending on your router of choice
$ bun x create-react-app my-app --template typescript
$ bun x create-next-app --example with-typescript-types my-app

Then, to get this amazing environment, simply execute the following command and answer the questions:

$ bun x antistatique-frontend@latest

What's inside?

.
ā”œā”€ā”€ .eslintrc           šŸ‘‰ ESLint configuration
ā”œā”€ā”€ .github
ā”‚Ā Ā  ā””ā”€ā”€ workflows       šŸ‘‰ Github Actions Workflow for Tests
ā”œā”€ā”€ .husky              šŸ‘‰ Husky (pre-commit) configuration
ā”œā”€ā”€ .lintstagedrc       šŸ‘‰ lint-staged (for pre-commits) configuration
ā”œā”€ā”€ .storybook 
ā”‚Ā Ā  ā”œā”€ā”€ main.ts         šŸ‘‰ Storybook configuration
ā”‚Ā Ā  ā””ā”€ā”€ preview.ts      šŸ‘‰ Where you load you global CSS
ā”œā”€ā”€ .stylelintrc        šŸ‘‰ Stylelint configuration
ā”œā”€ā”€ .vscode
ā”‚Ā Ā  ā”œā”€ā”€ extensions.json šŸ‘‰ Recommended plugins to install
ā”‚Ā Ā  ā””ā”€ā”€ settings.json   šŸ‘‰ Encourage you to format-on-save ESLint
ā”œā”€ā”€ cypress
ā”‚Ā Ā  ā”œā”€ā”€ fixtures
ā”‚Ā Ā  ā”œā”€ā”€ integration     šŸ‘‰ The place to put your E2E website tests
ā”‚Ā Ā  ā”œā”€ā”€ plugins
ā”‚Ā Ā  ā”œā”€ā”€ screenshots
ā”‚Ā Ā  ā”œā”€ā”€ support
ā”‚Ā Ā  ā”œā”€ā”€ tsconfig.json
ā”‚Ā Ā  ā””ā”€ā”€ videos
ā”œā”€ā”€ cypress.json        šŸ‘‰ Cypress configuration
ā”œā”€ā”€ jest.config.js      šŸ‘‰ Jest configuration
ā”œā”€ā”€ package.json        šŸ‘‰ Your package.json, with new devDepencies and new scripts
ā””ā”€ā”€ tsconfig.json       šŸ‘‰ TypeScript configuration

Available scripts

Now that you've get all the good stuff that you need, you have some new NPM scripts at your disposal:

  • bun run lint:js : Lint your TypeScript files
  • bun run lint:css : Lint your CSS/PostCSS files
  • bun run fix:js : Fix JS/TS lint errors
  • bun run fix:css : Fix CSS/PostCSS lint errors
  • bun run cypress:open : Open Cypress (for TDD)
  • bun run cypress:run : Run Cypress tests (website + storybook)
  • bun run jest:start : Start Jest server
  • bun run jest:run : Run Jest tests
  • bun run storybook:start : Start Storybook server
  • bun run storybook:build : Build static Storybook

IDE

The process above has been to ensure consistent quality of our code, regardless of the project. If you want to make your life easier and not always have surprises when you try to commit, make sure that your IDE is properly configured to handle those linters to highlight (and even fix) warnings and errors when editing a file. It's just a friendly advice.

Some ressources:

And just in case, ask your colleagues, they surely have great tips for you šŸ˜‰

1.7.0

3 months ago

1.6.0

5 months ago

1.5.1

10 months ago

1.5.0

10 months ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago