Commit graph

17 commits

Author SHA1 Message Date
Manav Rathi 82fbe55e5a Remove debugging package 2024-02-16 20:48:26 +05:30
Manav Rathi c124414242 Get the typeaware rules working 2024-02-16 20:48:26 +05:30
Manav Rathi 9bb2fbb6e1 Go back to existing config
The flat config requires enabling a flag in the VS code plugin, it in not
enabled by default.

    "eslint.experimental.useFlatConfig": true

This is an unnecessary expectation from all developers on the project, so we for
now live with the old format.
2024-02-16 20:48:26 +05:30
Manav Rathi a9a810ab99 Add typescript configuration in eslint
VSCode still gives an error

We had to set the type to module to get the `import` to work. Setting .mjs
didn't work (eslint didn't recognize the file). Setting the type to module
should be (based on my current understanding) not affect us negatively since we
are exporting a TypeScript library not a bundled one, and all the other source
files apart from this are intended to be `*.ts`.

Refs:
- https://jeremyrichardson.dev/blog/saga_of_learning_exports_property_in_packagejson
- https://github.com/eslint/eslint/discussions/17021
2024-02-16 20:48:26 +05:30
Manav Rathi d0155d1fc2 Switch to the flat config
eslint 8 already supports both formats, and will start defaulting to the new one in 9.

https://eslint.org/blog/2022/08/new-config-system-part-2/
2024-02-16 20:48:26 +05:30
Manav Rathi 378946a6e9 Switch to a flat config 2024-02-16 20:48:26 +05:30
Manav Rathi ba12c9c0c7 Set up linter for the package 2024-02-16 20:48:26 +05:30
Manav Rathi 6b5859dca7 Funnel .tsx extensions via subfolders 2024-02-16 20:48:26 +05:30
Manav Rathi 3720abe0ed Integrate the actual one 2024-02-16 20:47:25 +05:30
Manav Rathi 3289d137bf forceConsistentCasingInFileNames is true by default with TS 5 2024-02-16 20:47:25 +05:30
Manav Rathi 7263969953 Make src work with next
- The star in package.json matches any version
  https://docs.npmjs.com/cli/v10/configuring-npm/package-json

- VSCode is still giving errors
2024-02-16 20:47:25 +05:30
Manav Rathi 3fad0427a7 Next.js does not use Babel (at least for single file) anymore
> Compiling using Next.js compiler instead of Babel is enabled by default since v12

https://nextjs.org/docs/architecture/nextjs-compiler
2024-02-16 20:47:25 +05:30
Manav Rathi f3340db57e Make it work with src 2024-02-16 20:47:25 +05:30
Manav Rathi c87aca72ad Use yarn add @ente-io/utils@'file:packages/utils'
The version field is still required, but we can additionally add a private for
both semantic signalling and preventing this from being published to npm.
2024-02-16 20:47:25 +05:30
Manav Rathi 3aa0f4d0b8 Make it work with yarn workspace 2024-02-16 20:47:25 +05:30
Manav Rathi 9723f818e0 Add tsconfig 2024-02-16 20:47:25 +05:30
Manav Rathi c56f11fb8f Scaffold utils project 2024-02-16 20:47:25 +05:30