Skip to content

Introduce eslint and prettier #7

@battila7

Description

@battila7

Brief

Currently, cryptid-js has absolutely no linting or formatting rules: you can freely write code any way you want, commit it and push it. No restrictions, no checks. You can use tabs in one file and spaces in another (the horror! 😢).

To improve upon this situation, we should set up a linting and formatting toolchain using eslint (https://eslint.org/) and prettier (https://prettier.io/).

Task

  • Create the lint and lint:fix scripts in the package.json.
    • Obviously, lint:fix should run the linter with the --fix flag.
  • Configure eslint and prettier.
    • Please use separeate files, do not pollute the package.json with this configuration.
    • Please be aware, that cryptid-js is isomorphic: clients can use it on both the client-side and the server-side. The linting configuration should be aware of this scenario.

Settings for Prettier

Please use the following settings for prettier:

{
    "singleQuote": true,
    "printWidth": 120,
    "semi": false
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    🎉 Hacktoberfest 🍻Hacktoberfest-friendly issues, great for newcomers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions