Skip to content

Commit f771d66

Browse files
committed
First commit
0 parents  commit f771d66

15 files changed

+7142
-0
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false
12+
13+
[*.{yaml,yml,json,md,toml}]
14+
indent_size = 2

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
extends: 'eslint:recommended',
3+
parserOptions: { ecmaVersion: 9 },
4+
env: {
5+
node: true,
6+
jest: true,
7+
},
8+
};

.github/CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contribution Guidelines
2+
3+
We welcome all support, whether on bug reports, feature requests, code, design, reviews, tests, documentation, and more.
4+
5+
## Development
6+
7+
### Install
8+
9+
> Clone the project on your computer, and install [Node](https://nodejs.org). This project also uses [nvm](https://github.com/creationix/nvm).
10+
11+
```sh
12+
# Switch to the right version of Node
13+
nvm use
14+
# Then, install all project dependencies.
15+
npm install
16+
```
17+
18+
Also take the time to integrate [Prettier](https://prettier.io/) and [ESLint](https://eslint.org/) with your code editor.
19+
20+
### Working on the project
21+
22+
> Everything mentioned in the installation process should already be done.
23+
24+
```sh
25+
# Make sure you use the right node version.
26+
nvm use
27+
# View available commands with:
28+
npm run
29+
# Most used commands:
30+
npm run test:watch
31+
npm run lint
32+
```

.github/stylelint-logo.svg

Lines changed: 1 addition & 0 deletions
Loading

.gitignore

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# -------------------------------------------------
4+
# OS files
5+
# -------------------------------------------------
6+
.DS_Store
7+
.DS_Store?
8+
._*
9+
.Spotlight-V100
10+
.Trashes
11+
ehthumbs.db
12+
Thumbs.db
13+
14+
# -------------------------------------------------
15+
# Logs and databases
16+
# -------------------------------------------------
17+
logs
18+
*.log
19+
npm-debug.log*
20+
*.sql
21+
*.sqlite3
22+
23+
# -------------------------------------------------
24+
# Runtime data and caches
25+
# -------------------------------------------------
26+
pids
27+
*.pid
28+
*.seed
29+
*.pyc
30+
*.pyo
31+
*.pot
32+
33+
# -------------------------------------------------
34+
# Instrumentation and tooling
35+
# -------------------------------------------------
36+
lib-cov
37+
coverage
38+
.coverage
39+
.grunt
40+
.bundle
41+
webpack-stats.json
42+
webpack-stats.html
43+
44+
# -------------------------------------------------
45+
# Dependency directories
46+
# -------------------------------------------------
47+
node_modules*
48+
python_modules*
49+
bower_components
50+
.venv
51+
venv
52+
$virtualenv.tar.gz
53+
$node_modules.tar.gz
54+
55+
# -------------------------------------------------
56+
# Users Environment
57+
# -------------------------------------------------
58+
.lock-wscript
59+
.idea
60+
.installed.cfg
61+
.vagrant
62+
.anaconda
63+
Vagrantfile.local
64+
.env
65+
/local
66+
local.py
67+
*.sublime-project
68+
*.sublime-workspace
69+
.vscode
70+
71+
# -------------------------------------------------
72+
# Generated files
73+
# -------------------------------------------------
74+
dist
75+
build
76+
/var/static/
77+
/var/media/
78+
/docs/_build/
79+
develop-eggs
80+
*.egg-info
81+
downloads
82+
media
83+
eggs
84+
parts
85+
lib64
86+
.sass-cache
87+
88+
# -------------------------------------------------
89+
# Your own project's ignores
90+
# -------------------------------------------------

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.html
2+
coverage

.prettierrc.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See https://prettier.io/docs/en/options.html.
2+
# Prettier also reads .editorconfig.
3+
printWidth = 80
4+
singleQuote = true
5+
quoteProps = 'consistent'
6+
trailingComma = 'all'
7+
arrowParens = 'always'
8+
proseWrap = 'preserve'

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
sudo: false
2+
language: node_js
3+
install:
4+
- npm ci
5+
script:
6+
- npm run lint
7+
- npm run test
8+
# Log the contents of the published package in CI builds.
9+
- npm pack --loglevel notice 2>&1 >/dev/null | sed -e 's/^npm notice //' && rm *.tgz
10+
branches:
11+
except:
12+
- gh-pages
13+
notifications:
14+
email: false

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [0.1.0](https://github.com/torchbox/stylelint-config-torchbox/releases/tag/v0.1.0) (YYYY-MM-DD)
8+
9+
First release
10+
11+
## [x.y.z](https://github.com/torchbox/stylelint-config-torchbox/compare/va.b.c...vx.y.z) (YYYY-MM-DD)
12+
13+
### Bug Fixes
14+
15+
### Features
16+
17+
### BREAKING CHANGES

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2019-current Torchbox Ltd
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.

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# [stylelint-config-torchbox](https://www.npmjs.com/package/stylelint-config-torchbox) [<img src="https://raw.githubusercontent.com/torchbox/stylelint-config-torchbox/master/.github/stylelint-logo.svg?sanitize=true" alt="Stylelint" width="90" height="90" align="right">](https://stylelint.io)
2+
3+
[![stylelint-config-torchbox on npm](https://img.shields.io/npm/v/stylelint-config-torchbox.svg)](https://www.npmjs.com/package/stylelint-config-torchbox) [![Build Status](https://travis-ci.com/torchbox/stylelint-config-torchbox.svg?branch=master)](https://travis-ci.com/torchbox/stylelint-config-torchbox)
4+
5+
> Shareable stylelint config for CSS and SCSS, following Torchbox’s code style.
6+
7+
## Usage
8+
9+
Install stylelint and the config:
10+
11+
```sh
12+
npm install --save-dev stylelint stylelint-config-torchbox
13+
14+
```
15+
16+
Then [configure stylelint to use this config](https://stylelint.io/user-guide/configuration/#extends). As a `stylelint.config.js` in the root of your project:
17+
18+
```js
19+
module.exports = {
20+
// See https://github.com/torchbox/stylelint-config-torchbox for rules.
21+
extends: 'stylelint-config-torchbox',
22+
};
23+
```
24+
25+
### Tips
26+
27+
- Use Stylelint’s [`--report-needless-disables`](https://stylelint.io/user-guide/node-api/#reportneedlessdisables) flag to ensure you do not use more `stylelint-disable` comments than needed.
28+
29+
### Related tools
30+
31+
To get the most out of this config, it is assumed that projects have the following tools set up:
32+
33+
- [Prettier](https://prettier.io/) for automated formatting of stylesheets.
34+
- [Browserslist](https://github.com/browserslist/browserslist) and [autoprefixer](https://github.com/postcss/autoprefixer).

config.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
'use strict';
2+
3+
module.exports = {
4+
extends: ['stylelint-config-standard', 'stylelint-config-prettier'],
5+
plugins: ['stylelint-scss'],
6+
rules: {
7+
'color-named': 'never',
8+
'declaration-block-no-shorthand-property-overrides': true,
9+
'declaration-no-important': true,
10+
'selector-max-id': 0,
11+
'selector-max-type': 2,
12+
'max-nesting-depth': 4,
13+
'selector-max-specificity': '0,4,0',
14+
'value-no-vendor-prefix': true,
15+
'function-calc-no-invalid': true,
16+
'property-no-vendor-prefix': true,
17+
'selector-no-vendor-prefix': true,
18+
'media-feature-name-no-vendor-prefix': true,
19+
'declaration-empty-line-before': null,
20+
'no-descending-specificity': null,
21+
'at-rule-no-vendor-prefix': true,
22+
'at-rule-no-unknown': null,
23+
'scss/at-rule-no-unknown': true,
24+
'scss/declaration-nested-properties': 'never',
25+
'scss/selector-no-redundant-nesting-selector': true,
26+
'scss/percent-placeholder-pattern': '^do-not-use-placeholders$',
27+
'scss/dollar-variable-no-missing-interpolation': true,
28+
'scss/at-mixin-argumentless-call-parentheses': 'always',
29+
'scss/media-feature-value-dollar-variable': 'always',
30+
},
31+
};

0 commit comments

Comments
 (0)