├── .editorconfig ├── .github ├── dependabot.yml └── workflows │ ├── codeql-analysis.yml │ └── test.yml ├── .gitignore ├── .prettierignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── __tests__ └── index.js ├── index.js ├── jest-setup.js ├── package.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 2 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "npm" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '45 18 * * 5' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'javascript' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 37 | # Learn more: 38 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 39 | 40 | steps: 41 | - name: Checkout repository 42 | uses: actions/checkout@v2 43 | 44 | # Initializes the CodeQL tools for scanning. 45 | - name: Initialize CodeQL 46 | uses: github/codeql-action/init@v1 47 | with: 48 | languages: ${{ matrix.language }} 49 | # If you wish to specify custom queries, you can do so here or in a config file. 50 | # By default, queries listed here will override any specified in a config file. 51 | # Prefix the list here with "+" to use these queries and those in the config file. 52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 53 | 54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 55 | # If this step fails, then you should remove it and run the build manually (see below) 56 | - name: Autobuild 57 | uses: github/codeql-action/autobuild@v1 58 | 59 | # ℹ️ Command-line programs to run using the OS shell. 60 | # 📚 https://git.io/JvXDl 61 | 62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 63 | # and modify them (or add more) to build your code if your project 64 | # uses a compiled language 65 | 66 | #- run: | 67 | # make bootstrap 68 | # make release 69 | 70 | - name: Perform CodeQL Analysis 71 | uses: github/codeql-action/analyze@v1 72 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | on: [push, pull_request] 3 | env: 4 | CI: true 5 | 6 | jobs: 7 | run: 8 | name: Node ${{ matrix.node }} on ${{ matrix.os }} 9 | runs-on: ${{ matrix.os }} 10 | 11 | strategy: 12 | fail-fast: false 13 | matrix: 14 | node: [20] 15 | os: [ubuntu-latest, windows-latest] 16 | 17 | steps: 18 | - name: Clone repository 19 | uses: actions/checkout@v2 20 | 21 | - name: Set Node.js version 22 | uses: actions/setup-node@v1 23 | with: 24 | node-version: ${{ matrix.node }} 25 | 26 | - name: Install npm dependencies 27 | run: yarn install 28 | 29 | - name: Lint 30 | run: yarn lint 31 | 32 | - name: Run jest tests with coverage 33 | run: yarn test 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | npm-debug.log 4 | yarn-error.log 5 | coverage 6 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | package.json 2 | package-lock.json 3 | coverage 4 | README.md 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## v1.4.0 2 | 3 | - Added: support for stylelint version 16. 4 | 5 | ## v1.3.0 6 | 7 | - Added: support for stylelint version 15. 8 | 9 | ## v1.2.0 10 | 11 | - Added: support for stylelint versions 11, 12, 13, and 14. 12 | 13 | ## v1.1.0 14 | 15 | - Added: support for stylelint version 10. 16 | - Fixed: an error being thrown when passing severity level as a secondary option. 17 | 18 | ## v1.0.0 19 | 20 | - Intial release 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Krister Kari 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # stylelint-z-index-value-constraint 2 | 3 | [![NPM version](https://img.shields.io/npm/v/stylelint-z-index-value-constraint.svg)](https://www.npmjs.com/package/stylelint-z-index-value-constraint) 4 | [![Build Status](https://github.com/kristerkari/stylelint-z-index-value-constraint/workflows/Tests/badge.svg)](https://github.com/kristerkari/stylelint-z-index-value-constraint/actions?workflow=Tests) 5 | [![Downloads per month](https://img.shields.io/npm/dm/stylelint-z-index-value-constraint.svg)](http://npmcharts.com/compare/stylelint-z-index-value-constraint) 6 | [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github) 7 | 8 | Stylelint rule for setting minimum and maximum constraint value for z-index. 9 | 10 | This is a fork of [niksy/stylelint-number-z-index-constraint](https://github.com/niksy/stylelint-number-z-index-constraint) plugin. 11 | 12 | ## Install 13 | 14 | ```sh 15 | npm install stylelint-z-index-value-constraint --save-dev 16 | ``` 17 | 18 | or 19 | 20 | ```sh 21 | yarn add stylelint-z-index-value-constraint --dev 22 | ``` 23 | 24 | ## Usage 25 | 26 | Add this config to your `.stylelintrc`: 27 | 28 | ``` 29 | { 30 | "plugins": ["stylelint-z-index-value-constraint"], 31 | "rules": { 32 | "plugin/z-index-value-constraint": { 33 | "min": 1, 34 | "max": 10 35 | } 36 | } 37 | } 38 | ``` 39 | 40 | ## Details 41 | 42 | ```css 43 | a { 44 | z-index: 10; 45 | } 46 | /** ↑ 47 | * This number */ 48 | ``` 49 | 50 | From [CSS Tricks article](https://css-tricks.com/handling-z-index/): 51 | 52 | > It's fairly common to see people number in the hundreds with z-index in web design too. The idea being that you could slip something in between later if need be, which you couldn't if you did 1, 2, 3, etc, because z-index doesn't support decimals. 53 | 54 | This rule also handles negative values. 55 | 56 | ### Options 57 | 58 | #### `{ min: 10 }` 59 | 60 | The following patterns are considered warnings: 61 | 62 | ```css 63 | a { 64 | z-index: 9; 65 | } 66 | input { 67 | z-index: 2; 68 | } 69 | ``` 70 | 71 | ```css 72 | a { 73 | z-index: -9; 74 | } 75 | input { 76 | z-index: -2; 77 | } 78 | ``` 79 | 80 | The following patterns are _not_ considered warnings: 81 | 82 | ```css 83 | a { 84 | z-index: 10; 85 | } 86 | input { 87 | z-index: 25; 88 | } 89 | ``` 90 | 91 | ```css 92 | a { 93 | z-index: -10; 94 | } 95 | input { 96 | z-index: -25; 97 | } 98 | ``` 99 | 100 | #### `{ max: 9999 }` 101 | 102 | The following patterns are considered warnings: 103 | 104 | ```css 105 | a { 106 | z-index: 10000; 107 | } 108 | input { 109 | z-index: 200000; 110 | } 111 | ``` 112 | 113 | ```css 114 | a { 115 | z-index: -10000; 116 | } 117 | input { 118 | z-index: -200000; 119 | } 120 | ``` 121 | 122 | The following patterns are _not_ considered warnings: 123 | 124 | ```css 125 | a { 126 | z-index: 9999; 127 | } 128 | input { 129 | z-index: 8000; 130 | } 131 | ``` 132 | 133 | ```css 134 | a { 135 | z-index: -9999; 136 | } 137 | input { 138 | z-index: -8000; 139 | } 140 | ``` 141 | 142 | ## Optional options 143 | 144 | ### `ignoreValues: ["number"]` 145 | 146 | #### `{ max: 10 }, { ignoreValues: [11, 20] }` 147 | 148 | The following patterns are considered warnings: 149 | 150 | ```css 151 | a { 152 | z-index: 12; 153 | } 154 | input { 155 | z-index: 19; 156 | } 157 | ``` 158 | 159 | The following patterns are _not_ considered warnings: 160 | 161 | ```css 162 | a { 163 | z-index: 11; 164 | } 165 | input { 166 | z-index: 20; 167 | } 168 | ``` 169 | 170 | ## Dependencies 171 | 172 | This plugin has only [stylelint](https://github.com/stylelint/stylelint) as a dependency. 173 | 174 | --- 175 | 176 | ## License 177 | 178 | MIT 179 | -------------------------------------------------------------------------------- /__tests__/index.js: -------------------------------------------------------------------------------- 1 | const messages = require("..").messages; 2 | const ruleName = require("..").ruleName; 3 | 4 | testRule({ 5 | ruleName, 6 | config: { 7 | min: 10 8 | }, 9 | skipBasicChecks: true, 10 | 11 | accept: [ 12 | { 13 | code: "a { z-index:10; }", 14 | description: "z-index value that is the same as min limit" 15 | }, 16 | { 17 | code: "a { z-index:-10; }", 18 | description: "z-index value that is negative and the same as min limit" 19 | }, 20 | { 21 | code: "a { z-index:auto; }", 22 | description: "z-index: auto" 23 | } 24 | ], 25 | reject: [ 26 | { 27 | code: "a { z-index:9 }", 28 | description: "z-index value that is smaller than the min limit", 29 | message: messages.smallerThanMin(10) 30 | }, 31 | { 32 | code: "a { z-index:-9 }", 33 | description: 34 | "z-index value that is negative and smaller than the min limit", 35 | message: messages.smallerThanMin(-10) 36 | } 37 | ] 38 | }); 39 | 40 | testRule({ 41 | ruleName, 42 | config: { 43 | max: 9999 44 | }, 45 | skipBasicChecks: true, 46 | 47 | accept: [ 48 | { 49 | code: "a { z-index:9999; }", 50 | description: "z-index value that is the same as max limit" 51 | }, 52 | { 53 | code: "a { z-index:-9999; }", 54 | description: "z-index value that is negative and the same as max limit" 55 | }, 56 | { 57 | code: "a { z-index:auto; }", 58 | description: "z-index: auto" 59 | } 60 | ], 61 | reject: [ 62 | { 63 | code: "a { z-index:10000 }", 64 | message: messages.largerThanMax(9999), 65 | description: "z-index value that is larger than max limit" 66 | }, 67 | { 68 | code: "a { z-index:-10000 }", 69 | message: messages.largerThanMax(-9999), 70 | description: "z-index value that is negative and larger than max limit" 71 | } 72 | ] 73 | }); 74 | 75 | testRule({ 76 | ruleName, 77 | config: { 78 | min: 2, 79 | max: 10 80 | }, 81 | skipBasicChecks: true, 82 | 83 | accept: [ 84 | { 85 | code: "a { z-index:10; }", 86 | description: "z-index value that is the same as max limit" 87 | }, 88 | { 89 | code: "a { z-index:-10; }", 90 | description: "z-index value that is negative and the same as max limit" 91 | }, 92 | { 93 | code: "a { z-index:5; }", 94 | description: "z-index value that is bigger than min limit" 95 | }, 96 | { 97 | code: "a { z-index:2; }", 98 | description: "z-index value that is the same as min limit" 99 | }, 100 | { 101 | code: "a { z-index:auto; }", 102 | description: "z-index: auto" 103 | } 104 | ], 105 | reject: [ 106 | { 107 | code: "a { z-index:11 }", 108 | message: messages.largerThanMax(10), 109 | description: "z-index value that is larger than max limit" 110 | }, 111 | { 112 | code: "a { z-index:-11 }", 113 | message: messages.largerThanMax(-10), 114 | description: "z-index value that is negative and larger than max limit" 115 | }, 116 | { 117 | code: "a { z-index: 1 }", 118 | message: messages.smallerThanMin(2), 119 | description: "z-index value that is smaller than min limit" 120 | } 121 | ] 122 | }); 123 | 124 | testRule({ 125 | ruleName, 126 | config: [ 127 | { 128 | min: 3, 129 | max: 10 130 | }, 131 | { ignoreValues: [1, -1, 444] } 132 | ], 133 | skipBasicChecks: true, 134 | 135 | accept: [ 136 | { 137 | code: "a { z-index:10; }", 138 | description: "z-index value that is the same as max limit" 139 | }, 140 | { 141 | code: "a { z-index:-10; }", 142 | description: "z-index value that is negative and the same as max limit" 143 | }, 144 | { 145 | code: "a { z-index:5; }", 146 | description: "z-index value that is bigger than min limit" 147 | }, 148 | { 149 | code: "a { z-index:3; }", 150 | description: "z-index value that is the same as min limit" 151 | }, 152 | { 153 | code: "a { z-index:auto; }", 154 | description: "z-index: auto" 155 | }, 156 | { 157 | code: "a { z-index: 1 }", 158 | description: "z-index value that is ignored and smaller than min limit" 159 | }, 160 | { 161 | code: "a { z-index: -1 }", 162 | description: "z-index value that is ignored and smaller than min limit" 163 | }, 164 | { 165 | code: "a { z-index: 444; }", 166 | description: "z-index value that is ignored" 167 | } 168 | ], 169 | reject: [ 170 | { 171 | code: "a { z-index:2 }", 172 | message: messages.smallerThanMin(3), 173 | description: "z-index value that is smaller than min limit" 174 | }, 175 | { 176 | code: "a { z-index:11 }", 177 | message: messages.largerThanMax(10), 178 | description: "z-index value that is larger than max limit" 179 | }, 180 | { 181 | code: "a { z-index:-11 }", 182 | message: messages.largerThanMax(-10), 183 | description: "z-index value that is negative and larger than max limit" 184 | } 185 | ] 186 | }); 187 | 188 | testRule({ 189 | ruleName, 190 | config: [ 191 | { 192 | min: 10 193 | }, 194 | { severity: "error" } 195 | ], 196 | skipBasicChecks: true, 197 | 198 | accept: [ 199 | { 200 | code: "a { z-index:10; }", 201 | description: "z-index value that is the same as min limit" 202 | } 203 | ] 204 | }); 205 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const stylelint = require("stylelint"); 2 | 3 | const ruleName = "plugin/z-index-value-constraint"; 4 | 5 | const messages = stylelint.utils.ruleMessages(ruleName, { 6 | largerThanMax: expected => 7 | `Expected z-index to have maximum value of ${expected}.`, 8 | smallerThanMin: expected => 9 | `Expected z-index to have minimum value of ${expected}.` 10 | }); 11 | 12 | function isNumber(value) { 13 | return typeof value === "number"; 14 | } 15 | 16 | function isNegative(value) { 17 | return value < 0; 18 | } 19 | 20 | const _isNaN = 21 | Number.isNaN || 22 | function (value) { 23 | return value !== value; 24 | }; 25 | 26 | function possibleValueTest(value) { 27 | return isNumber(value) && !isNegative(value); 28 | } 29 | 30 | module.exports = stylelint.createPlugin( 31 | ruleName, 32 | function (options, secondary) { 33 | return function (cssRoot, result) { 34 | const validOptions = stylelint.utils.validateOptions( 35 | result, 36 | ruleName, 37 | { 38 | actual: options, 39 | possible: { 40 | min: possibleValueTest, 41 | max: possibleValueTest 42 | } 43 | }, 44 | { 45 | actual: secondary, 46 | possible: { 47 | ignoreValues: [isNumber] 48 | }, 49 | optional: true 50 | } 51 | ); 52 | 53 | if (!validOptions) { 54 | return; 55 | } 56 | 57 | cssRoot.walkDecls("z-index", function (decl) { 58 | const value = Number(decl.value); 59 | 60 | if ( 61 | _isNaN(value) || 62 | (secondary && 63 | Array.isArray(secondary.ignoreValues) && 64 | secondary.ignoreValues.indexOf(value) > -1) 65 | ) { 66 | return; 67 | } 68 | 69 | if (options.max && Math.abs(value) > options.max) { 70 | stylelint.utils.report({ 71 | ruleName, 72 | result, 73 | node: decl, 74 | message: messages.largerThanMax( 75 | isNegative(value) ? options.max * -1 : options.max 76 | ) 77 | }); 78 | } 79 | 80 | if (options.min && Math.abs(value) < options.min) { 81 | stylelint.utils.report({ 82 | ruleName, 83 | result, 84 | node: decl, 85 | message: messages.smallerThanMin( 86 | isNegative(value) ? options.min * -1 : options.min 87 | ) 88 | }); 89 | } 90 | }); 91 | }; 92 | } 93 | ); 94 | 95 | module.exports.ruleName = ruleName; 96 | module.exports.messages = messages; 97 | -------------------------------------------------------------------------------- /jest-setup.js: -------------------------------------------------------------------------------- 1 | const getTestRule = require("jest-preset-stylelint/getTestRule"); 2 | 3 | global.testRule = getTestRule({ plugins: ["./index.js"] }); 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "stylelint-z-index-value-constraint", 3 | "version": "1.4.0", 4 | "description": "Stylelint rule for setting minimum and maximum constraint value for z-index.", 5 | "main": "index.js", 6 | "author": { 7 | "name": "Krister Kari", 8 | "url": "https://github.com/kristerkari/" 9 | }, 10 | "license": "MIT", 11 | "files": [ 12 | "index.js", 13 | "CHANGELOG.md", 14 | "README.md" 15 | ], 16 | "scripts": { 17 | "lint": "eslint . --ignore-path .gitignore", 18 | "precommit": "lint-staged", 19 | "pretest": "npm run lint", 20 | "prettify": "prettier --write '**/*.{js,json,md}'", 21 | "release": "np", 22 | "test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest --coverage" 23 | }, 24 | "peerDependencies": { 25 | "stylelint": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" 26 | }, 27 | "devDependencies": { 28 | "cross-env": "^7.0.3", 29 | "eslint": "^8.56.0", 30 | "eslint-plugin-sort-requires": "^2.1.0", 31 | "husky": "^9.0.11", 32 | "jest": "^29.3.1", 33 | "jest-cli": "^29.3.1", 34 | "jest-preset-stylelint": "^7.0.0", 35 | "lint-staged": "^15.2.2", 36 | "np": "^10.0.0", 37 | "prettier": "^3.0.0", 38 | "stylelint": "^16.2.1" 39 | }, 40 | "engines": { 41 | "node": ">=6" 42 | }, 43 | "keywords": [ 44 | "css", 45 | "less", 46 | "lint", 47 | "linter", 48 | "scss", 49 | "stylelint", 50 | "stylelint-plugin", 51 | "sugarss", 52 | "z-index" 53 | ], 54 | "repository": { 55 | "type": "git", 56 | "url": "git+https://github.com/kristerkari/stylelint-z-index-value-constraint.git" 57 | }, 58 | "bugs": { 59 | "url": "https://github.com/kristerkari/stylelint-z-index-value-constraint/issues" 60 | }, 61 | "homepage": "https://github.com/kristerkari/stylelint-z-index-value-constraint#readme", 62 | "lint-staged": { 63 | "**/*.{js,json,md}": [ 64 | "prettier --write", 65 | "git add" 66 | ] 67 | }, 68 | "eslintConfig": { 69 | "extends": "eslint:recommended", 70 | "parserOptions": { 71 | "ecmaVersion": "latest" 72 | }, 73 | "env": { 74 | "es6": true, 75 | "jest": true, 76 | "node": true 77 | }, 78 | "plugins": [ 79 | "sort-requires" 80 | ], 81 | "globals": { 82 | "testRule": true 83 | }, 84 | "rules": { 85 | "eqeqeq": "error", 86 | "no-use-before-define": [ 87 | "error", 88 | "nofunc" 89 | ], 90 | "sort-requires/sort-requires": "error", 91 | "strict": "off", 92 | "arrow-spacing": "error", 93 | "no-var": "error", 94 | "object-shorthand": "error", 95 | "prefer-const": "error", 96 | "template-curly-spacing": "error" 97 | } 98 | }, 99 | "jest": { 100 | "clearMocks": true, 101 | "collectCoverage": false, 102 | "collectCoverageFrom": [ 103 | "index.js" 104 | ], 105 | "coverageDirectory": "./coverage/", 106 | "coverageReporters": [ 107 | "lcov", 108 | "text" 109 | ], 110 | "coverageThreshold": { 111 | "global": { 112 | "branches": 75, 113 | "functions": 75, 114 | "lines": 75, 115 | "statements": 75 116 | } 117 | }, 118 | "testEnvironment": "node", 119 | "setupFiles": [ 120 | "./jest-setup.js" 121 | ] 122 | }, 123 | "prettier": { 124 | "printWidth": 80, 125 | "tabWidth": 2, 126 | "useTabs": false, 127 | "semi": true, 128 | "singleQuote": false, 129 | "trailingComma": "none", 130 | "bracketSpacing": true, 131 | "jsxBracketSameLine": false, 132 | "arrowParens": "avoid" 133 | } 134 | } 135 | --------------------------------------------------------------------------------