diff --git a/README.md b/README.md index bacb0c1..678e7c8 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ To use, create a `.eslintrc.json` and extend the config: ### Extended ESLint Rules -The idea behind this config is to enforce consistency across all projects. We've tried to keep the rules as minimal as possible, and for the most part simply inherit from the recommended rules of the plugins we use. The main exceptions are when it comes to imports. **Note**: We've purposely only defined rules that are auto fixable, these rules should make it easier to write code, and not get in the way. +The idea behind this config is to enforce consistency across all projects. We've tried to keep the rules as minimal as possible, and for the most part simply inherit from the recommended rules of the plugins we use. The main exceptions are when it comes to the following. **Note**: We've purposely only defined rules that are auto fixable, these rules should make it easier to write code, and not get in the way. #### [eslint-plugin-unused-imports](https://www.npmjs.com/package/eslint-plugin-unused-imports) @@ -108,6 +108,10 @@ This is used to auto fix some common inconsistencies. The following rules have b - [import/newline-after-import](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md) - Makes sure there’s a newline after the imports. - [import/no-duplicates](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md) - Merges import statements from the same file. +### Quotes + +We enforce the use of "double quotes" when possible. We defined this with the intent of it being applied as a auto-fixable rule to enforce consistency with [prettier](https://prettier.io/docs/en/rationale.html#strings). + ## Stylelint ### @buildinams/lint/stylelint diff --git a/eslint/configs/base.js b/eslint/configs/base.js index 4a373ff..abfd64e 100644 --- a/eslint/configs/base.js +++ b/eslint/configs/base.js @@ -31,5 +31,8 @@ module.exports = { // Disallow the use of undeclared variables "no-undef": "error", + + // Force the use of double quotes when possible + quotes: ["error", "double"], }, }; diff --git a/package-lock.json b/package-lock.json index d2d31a2..d30bf4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@buildinams/lint", - "version": "0.1.1", + "version": "0.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@buildinams/lint", - "version": "0.1.1", + "version": "0.2.0", "license": "MIT", "dependencies": { "@babel/eslint-parser": "^7.19.1", diff --git a/package.json b/package.json index 33923e6..fcbd474 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@buildinams/lint", "description": "BiA's base lint config(s).", - "version": "0.1.1", + "version": "0.2.0", "license": "MIT", "author": "Build in Amsterdam (https://www.buildinamsterdam.com/)", "exports": {