@maarkllc/code-config v3.0.1
Code configurations
Collection of configurations to enforce consistent development guidelines using Maark's recommendations.
To install a new configuration you can either use the CLI to handle everything automatically or do it manually.
Using the CLI with npx
npx @maarkllc/code-configThis will guide you through a few steps that will ultimately install the desired configuration. That's it, happy coding!
Installing the CLI globally
Alternatively, you can install the code-config CLI globally and use it
like so:
npm i -g @maarkllc/code-config
code-configAvailable commands
If you want to skip the first step you can pass the command as a parameter. This is optional because if you don't pass anything, the CLI will ask you what you want to execute.
code-config [command]eslintTo install an ESLint configuration.stylelintTo install a Stylelint configuration.githookTo install a ESLint and Stylelint Git Hook commands.helpShows the help screen.
e.g.
code-config eslint
// or
npx @maarkllc/code-config stylelintInstalling configurations manually
All configurations are inside the configs/ folder, categorized by tool.
Each tool explains how to install it manually.
Supported configurations
The idea is to have a structure of configurations that extend from each other as needed depending on the project stack, it is important to define rules to be able to identify anti-patterns and code-smells for specific known libraries. This diagram helps illustrate the possible configurations and how it can scale in the future to include other tools of trade for bundling or unit testing:
%%{init: {'theme':'base'}}%%
graph TD
    subgraph Legend
        L1[Available]:::available --> L2[Not ready]
    end
    A[ESLint]:::available --> B[JavaScript]:::available
    B --> C[js/base]:::available
    C --> D[js/react]:::available
    C --> js/next:::available
    C --> js/vue
    A --> E[Typescript]
    F[Stylelint]:::available --> G[CSS]:::available
    F --> H[SCSS]:::available
    G --> css/base:::available
    H --> scss/base:::available
    Webpack
    classDef available stroke:#0B410E,fill:#94D1BEESLint
js/base: It has the basic configuration for JS projects.js/react: It extends fromjs/baseand adds the React plugin and rules which includes hooks.
Stylelint
css/base: It extends fromstylelint-config-standard.scss/base: It extends fromcss/baseandstylelint-config-standard-scss.
GitHook
Multi select (choose with spacebar one or more) between:
eslint: to add hook to validate eslint.stylelint: to add hook to validate Stylelint.
Development
For more information please refer to the documentation.