A modern Gatsby starter with strict linting and auto-formatting rules.
- Clone this project and install all the required dependencies (e.g. with
gatsby new gatsby-example-site https://github.com/kripod/gatsby-starter-modern
after making sure that Gatsby CLI is installed globally withnpm install --global gatsby-cli
) - Start a development server with
yarn develop
ornpm run develop
SCSS, a superset of CSS is used for styling components. The usage of Sass-specific extensions is optional, as every valid CSS stylesheet is a valid SCSS file with the same meaning.
The default style of browsers is normalized by modern-normalize.
Prettier is an opinionated code formatter aiming to provide codebase consistency when multiple developers work on the same project. The main reason behind adopting Prettier is to stop all the on-going debates over coding styles.
Linters are tools that analyze source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.
- JavaScript files are linted by ESLint, enforcing the Airbnb JavaScript Style Guide through an overridable set of rules provided by eslint-config-airbnb-base.
- SCSS files are linted by stylelint, adhering to the rules specified in stylelint-config-recommended-scss and the declaration order conventions of idiomatic-css (enforced by stylelint-config-idiomatic-order).