All Projects â†’ ice-lab â†’ spec

ice-lab / spec

Licence: other
đŸŖ easy to use eslint/stylelint/tslint/prettier/...

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
SCSS
7915 projects
Vue
7211 projects

Projects that are alternatives of or similar to spec

Aurora
đŸ“Ļ A set of configs and rules for Typescript projects.
Stars: ✭ 30 (-50%)
Mutual labels:  tslint, linter, prettier
React 2048 Game
🎮 A fancy 2048 game build with react, redux best practices.
Stars: ✭ 401 (+568.33%)
Mutual labels:  stylelint, prettier
Web Configs
Common configurations for building web apps at Shopify
Stars: ✭ 302 (+403.33%)
Mutual labels:  stylelint, prettier
Prettier Stylelint
code > prettier > stylelint > formatted code
Stars: ✭ 162 (+170%)
Mutual labels:  stylelint, prettier
stylelint-processor-glamorous
💄 Lint glamorous and related css-in-js with stylelint
Stars: ✭ 18 (-70%)
Mutual labels:  stylelint, linter
elint
A easy way to lint your code
Stars: ✭ 38 (-36.67%)
Mutual labels:  stylelint, linter
React Mobx React Router Boilerplate
A simple boilerplate based on create-react-app and add mobx, react-router, linter, prettier and so on. 一ä¸ĒįŽ€å•įš„ react č„šæ‰‹æžļ䞝čĩ–äēŽ create-react-app 新åĸžäē† mobx react-router,linter,prettier į­‰ã€‚
Stars: ✭ 12 (-80%)
Mutual labels:  stylelint, prettier
ember-boilerplate
👓 The stable base upon which we build our Ember.js projects at Mirego.
Stars: ✭ 33 (-45%)
Mutual labels:  stylelint, prettier
Flake8
The official GitHub mirror of https://gitlab.com/pycqa/flake8
Stars: ✭ 1,112 (+1753.33%)
Mutual labels:  stylelint, linter
Express Webpack React Redux Typescript Boilerplate
🎉 A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (+160%)
Mutual labels:  stylelint, tslint
Gulp Stylelint
Gulp plugin for running Stylelint results through various reporters.
Stars: ✭ 149 (+148.33%)
Mutual labels:  stylelint, linter
Nextjs Ts
Opinionated Next JS project boilerplate with TypeScript and Redux
Stars: ✭ 134 (+123.33%)
Mutual labels:  stylelint, prettier
react-component-library-lerna
Build your own React component library managed with lerna, presented with storybook and published in private npm registry.
Stars: ✭ 55 (-8.33%)
Mutual labels:  stylelint, prettier
Vscode Stylelint
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: ✭ 260 (+333.33%)
Mutual labels:  stylelint, linter
dva-typescript-antd-starter-kit
A admin dashboard application demo based on antd by typescript and dva
Stars: ✭ 61 (+1.67%)
Mutual labels:  stylelint, prettier
Stylelint Processor Styled Components
Lint your styled components with stylelint!
Stars: ✭ 639 (+965%)
Mutual labels:  stylelint, linter
React Typescript Webpack2 Cssmodules Postcss
Simple Starter Template for React, TypeScript, postCSS, ITCSS, CSS-Modules, Webpack and Live Reloading (React Hot Loader 3)
Stars: ✭ 117 (+95%)
Mutual labels:  stylelint, tslint
figma-plugin-typescript-boilerplate
Figma plugin TypeScript boilerplate to start developing right away
Stars: ✭ 43 (-28.33%)
Mutual labels:  stylelint, prettier
vscode-stylelint-plus
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint, support auto fix on save.
Stars: ✭ 32 (-46.67%)
Mutual labels:  stylelint, linter
React Ssr Starter
All have been introduced React environment
Stars: ✭ 20 (-66.67%)
Mutual labels:  stylelint, prettier

@iceworks/spec

Easy to use eslint(support TypeScript) / stylelint / prettier / commitlint in rax, ice and react project. And spec means specification.

Install

$ npm i --save-dev @iceworks/spec eslint stylelint prettier @commitlint/cli

PS: You don't need to install other eslint plugins and parsers.

Usage

ESLint

1. Create configuration file

First create a .eslintrc.js file. Then edit your config.

2. Update config

rules base on eslint-config-ali and @iceworks/eslint-plugin-best-practices.

// .eslintrc.js
const { getESLintConfig } = require('@iceworks/spec');

// getESLintConfig(rule: 'common'|'rax'|'react'|'vue', customConfig?);
module.exports = getESLintConfig('react');

stylelint

1. Create configuration file

First create a .stylelintrc.js file. Then edit your config.

2. Update config

rules base on stylelint-config-ali

// .stylelintrc.js
const { getStylelintConfig } = require('@iceworks/spec');

// getStylelintConfig(rule: 'common'|'rax'|'react'|'vue', customConfig?);
module.exports = getStylelintConfig('react');

prettier rules

1. Create configuration file

First create a .prettierrc.js file. Then edit your config.

2. Update config

// .prettierrc.js
const { getPrettierConfig } = require('@iceworks/spec');

// getPrettierConfig(rule: 'common'|'rax'|'react'|'vue', customConfig?);
module.exports = getPrettierConfig('react');

commitlint

1. Create configuration file

First create a .commitlintrc.js file. Then edit your config.

2. Update config

rules base on commitlint-config-ali

// .commitlintrc.js
const { getCommitlintConfig } = require('@iceworks/spec');

// getCommitlintConfig(rule: 'common'|'rax'|'react'|'vue', customConfig?);
module.exports = getCommitlintConfig('react');

FAQ

Custom config

// .eslintrc.js
const { getESLintConfig } = require('@iceworks/spec');

// getESLintConfig(rule: 'common'|'rax'|'react'|'vue', customConfig?);
module.exports = getESLintConfig('rax', {
  // custom config it will merge into main config
  rules: {
    // ...
  },
});

package.json scripts

Add scripts in your package.json, example:

"scripts": {
  "lint": "npm run eslint && npm run stylelint",
  "eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./",
  "stylelint": "stylelint ./**/*.scss",
  "prettier": "prettier **/* --write"
}

Then use npm run lint check your project, ues npm run prettier update your code.

Git hooks

To lint commits before they are created you can use Husky's Git hook.

Install in your project npm install husky --save-dev or yarn add -D husky.

After that, we recommend you to see husky docs, then create "commit-msg" and "pre-commit" config.

Update from @ice/spec

If you are using @ice/spec in your project, we recommend use @iceworks/spec to get better maintainability and faster response to lint rules support.

Based on @iceworks/spec's simple API you can quickly migrate your project, install and update your lint config file, the mission is completed 😁.

Develop

Run Test

npm run test

run test for specific component

npm run test -- packages/spec

Run Prettier

npm run prettier

Run Lint

npm run lint
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].