Setup Typescript #6

Open
opened 2021-12-22 03:58:39 +00:00 by lewismoten · 4 comments
lewismoten commented 2021-12-22 03:58:39 +00:00 (Migrated from github.com)
  • Setup webpack / babel to process typescript
  • Convert all deployed files to typescript
  • Resolve all compile errors (down to 90)
  • Infer React PropTypes from interfaces in develop / run-time
  • Setup IDE to support linting typescript files
    • Atom IDE Invalid URL: eslintrc.cjs
    • Review plugin:jsx-a11y/recommended
    • Review plugin:prettier/recommended
    • Review plugin:import/recommended
  • Add typescript file to @lewismoten/emoji project
  • Restore text alignment in SelectLanguage dropdown list.
- [x] Setup webpack / babel to process typescript - [x] Convert all deployed files to typescript - [ ] Resolve all compile errors (down to 90) - [ ] Infer React PropTypes from interfaces in develop / run-time - [x] Setup IDE to support linting typescript files - [ ] Atom IDE Invalid URL: eslintrc.cjs - [ ] Review plugin:jsx-a11y/recommended - [ ] Review plugin:prettier/recommended - [ ] Review plugin:import/recommended - [ ] Add typescript file to @lewismoten/emoji project - [ ] Restore text alignment in SelectLanguage dropdown list.
lewismoten commented 2021-12-22 08:10:00 +00:00 (Migrated from github.com)

Added a script npm run lint, everything runs fine on the command line.
Adding anything with @typescript-eslint in .eslintrc.js is throwing an error:

Error while running ESLint: Failed to load plugin @typescript-eslint declared in .eslintrc.js#overrides[1]: Invalid URL: eslintrc.cjs

I'm not referencing eslintrc.cjs anywhere. It seems to be something with the Atom IDE. I've created a new file eslintrc.cjs and it has no effect:

// eslintrc.cjs
module.exports = require("./.eslintrc.js");

Some people recommend that you should remove "type": "module" from your package.json file, or change it to script. This wasn't there, and adding it as either module or script has no effect.

Another recommendation is to downgrade eslint to a prior version. I hadn't tried it yet...

Added a script `npm run lint`, everything runs fine on the command line. Adding anything with `@typescript-eslint` in `.eslintrc.js` is throwing an error: > Error while running ESLint: Failed to load plugin `@typescript-eslint` declared in `.eslintrc.js#overrides[1]`: Invalid URL: eslintrc.cjs I'm not referencing `eslintrc.cjs` anywhere. It seems to be something with the Atom IDE. I've created a new file `eslintrc.cjs` and it has no effect: ```javascript // eslintrc.cjs module.exports = require("./.eslintrc.js"); ``` Some people recommend that you should remove `"type": "module"` from your package.json file, or change it to `script`. This wasn't there, and adding it as either `module` or `script` has no effect. Another recommendation is to downgrade eslint to a prior version. I hadn't tried it yet...
lewismoten commented 2021-12-22 08:26:49 +00:00 (Migrated from github.com)

A .cjs file can be found at node_modules/@eslint/eslintrc/dist/eslintrc.cjs

A `.cjs` file can be found at `node_modules/@eslint/eslintrc/dist/eslintrc.cjs`
lewismoten commented 2021-12-22 08:30:30 +00:00 (Migrated from github.com)

Maybe try a different IDE - Visual Studio Code

Maybe try a different IDE - `Visual Studio Code`
lewismoten commented 2021-12-22 08:42:32 +00:00 (Migrated from github.com)

... no plugins needed. VS Code already highlighted what needed to be fixed. No IDE errors.

... no plugins needed. VS Code already highlighted what needed to be fixed. No IDE errors.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lewismoten/schmuck-miser#6
No description provided.