Skip to content

Commit

Permalink
feat(stylelint): add @vtex/shoreline-stylelint configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasaarcoverde committed Nov 22, 2023
1 parent 617daa6 commit 2584882
Show file tree
Hide file tree
Showing 4 changed files with 835 additions and 97 deletions.
25 changes: 25 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Keep in sync with .gitignore + .prettierignore
**/node_modules
**/dist
packages/icons/native
packages/admin-ui-docs
packages/next-docs
**/.cache
**/coverage
**/build
storybook-static
**/*.stories.ts

# Resolve: Parsing error: Unexpected token <
**/gatsby-browser.js
**/gatsby-ssr.js
**/404.js
**/src/theme/**/*.js

# Resolve: Parsing error: Unexpected token .
# not accepting conditional chaining
packages/admin-ui-codemod/src/space-tokens-review.js
packages/create-raccoon-app/src/index.js

# Resolve: Expected exception block, space or tab after '//' in comment
examples/shoreline-nextjs-integration/next-env.d.ts
9 changes: 9 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
extends: ['@vtex/shoreline-stylelint'],
plugins: ['stylelint-prettier'],
files: ['**/*.css'],
reportDescriptionlessDisables: true,
reportNeedlessDisables: true,
reportInvalidScopeDisables: true,
rules: {},
}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"clean": "pnpm turbo clean && turbo run clean",
"format": "prettier --write \"packages/**/*.{ts,js,tsx,jsx,json}\" \"examples/**/*.{ts,js,tsx,jsx,json}\"",
"lint": "eslint --ext .ts,.tsx,.js,.jsx \"packages/**/*.{ts,js,tsx,jsx}\" \"examples/**/*.{ts,js,tsx,jsx}\"",
"lint:css": "stylelint '**/*.css'",
"build-storybook": "storybook build",
"dev-storybook": "pnpm storybook dev -p 6006",
"build:storybook": "pnpm build && pnpm storybook build",
Expand Down Expand Up @@ -104,6 +105,7 @@
"eslint-plugin-graphql": "4.0.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jest": "27.2.2",
"jest-preset-stylelint": "^6.3.2",
"eslint-plugin-tsc": "2.0.0",
"happy-dom": "12.9.0",
"husky": "^8.0.3",
Expand Down Expand Up @@ -132,7 +134,10 @@
"typescript": "4.9.5",
"url-loader": "^4.1.0",
"vite": "4.3.9",
"vitest": "0.34.6"
"vitest": "0.34.6",
"stylelint": "^15.11.0",
"stylelint-prettier": "^4.0.2",
"@vtex/shoreline-stylelint": "workspace"
},
"lint-staged": {
"*.{ts,tsx,js,jsx}": [
Expand Down
Loading

0 comments on commit 2584882

Please sign in to comment.