Skip to content

Commit

Permalink
chore: Add and initialize style-lint (#3420)
Browse files Browse the repository at this point in the history
* chore: Add and initialize stylelint

* chore: Remove js and jsx from settings
  • Loading branch information
Chef-Yogi authored Mar 10, 2022
1 parent deb61b4 commit 4ef5185
Show file tree
Hide file tree
Showing 3 changed files with 299 additions and 19 deletions.
36 changes: 36 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* @type {import("stylelint").ConfigRules}
*/
const commonRules = {
'alpha-value-notation': null,
'color-function-notation': null,
'comment-empty-line-before': null,
'custom-property-empty-line-before': null,
'declaration-empty-line-before': null,
'function-whitespace-after': null,
'no-descending-specificity': null,
'rule-empty-line-before': null,
'value-keyword-case': null,
}

/**
* @type {import("stylelint").Config}
*/
module.exports = {
overrides: [
{
files: ['**/*.{ts,tsx}'],
extends: [
'stylelint-config-standard',
'stylelint-config-recommended',
'stylelint-config-styled-components',
'stylelint-config-prettier',
],
customSyntax: '@stylelint/postcss-css-in-js',
rules: {
...commonRules,
'function-no-unknown': null,
},
},
],
}
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"test:config": "jest src/config/__tests__/ --testPathIgnorePatterns",
"integration-test": "start-server-and-test start http://localhost:3000 'cypress run'",
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
"lint:style": "npx stylelint '**/*.{ts,tsx}'",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx}\"",
"format:check:staged": "lint-staged",
"format:write": "prettier --write \"**/*.{js,jsx,ts,tsx}\"",
Expand Down Expand Up @@ -97,6 +98,7 @@
},
"devDependencies": {
"@next/eslint-plugin-next": "^12.0.10",
"@stylelint/postcss-css-in-js": "^0.37.2",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.3",
"@testing-library/react-hooks": "^7.0.2",
Expand All @@ -122,10 +124,17 @@
"husky": "^7.0.0",
"jest": "^27.4.5",
"lerna": "^4.0.0",
"postcss-scss": "^4.0.3",
"postcss-syntax": "^0.36.2",
"prettier": "^2.3.0",
"serve": "^12.0.0",
"source-map-explorer": "^2.5.2",
"start-server-and-test": "^1.14.0",
"stylelint": "^14.5.3",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended": "^7.0.0",
"stylelint-config-standard": "^25.0.0",
"stylelint-config-styled-components": "^0.1.1",
"ts-node": "^9.1.1",
"turbo": "^1.1.4",
"typechain": "^6.1.0"
Expand Down
Loading

0 comments on commit 4ef5185

Please sign in to comment.