Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Yolijn committed Feb 14, 2021
0 parents commit 94b93ee
Show file tree
Hide file tree
Showing 47 changed files with 27,438 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*.{css,js,json,jsx,html,md,mdx,scss,ts,tsx}]
charset = UTF-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[*ignore]
charset = UTF-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore 3rd party files
node_modules

# Ignore generated files
dist
103 changes: 103 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"extends": ["eslint-config-prettier"],
"env": {
"browser": true,
"es6": true,
"node": false
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"array-callback-return": ["error", { "checkForEach": false }],
"block-scoped-var": "error",
"consistent-return": "error",
"constructor-super": "error",
"eqeqeq": "error",
"for-direction": "error",
"getter-return": "error",
"no-alert": "error",
"no-async-promise-executor": "error",
"no-caller": "error",
"no-case-declarations": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-const-assign": "error",
"no-constant-condition": "error",
"no-constructor-return": "error",
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "error",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-eval": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": "error",
"no-extra-semi": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-import-assign": "error",
"no-inner-declarations": "error",
"no-invalid-regexp": "error",
"no-invalid-this": "error",
"no-irregular-whitespace": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-misleading-character-class": "error",
"no-multi-str": "error",
"no-new-func": "error",
"no-new-symbol": "error",
"no-new-wrappers": "error",
"no-obj-calls": "error",
"no-octal": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-prototype-builtins": "error",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-setter-return": "error",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-this-before-super": "error",
"no-throw-literal": "error",
"no-undef": "error",
"no-unexpected-multiline": "error",
"no-unmodified-loop-condition": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-unused-vars": "error",
"no-useless-call": "error",
"no-useless-catch": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-useless-return": "error",
"no-void": "error",
"no-with": "error",
"prefer-regex-literals": "error",
"radix": "error",
"require-yield": "error",
"use-isnan": "error",
"valid-typeof": "error",
"vars-on-top": "off",
"yoda": "error"
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
34 changes: 34 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Continuous Delivery

on:
push:
branches:
- main

jobs:
continuous-delivery:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: "14.x"

- name: install, build, lint and test
run: |
yarn
yarn bootstrap
yarn build
yarn lint
yarn test
# - name: "TODO: Deploy to Github Pages and remove azure deploy below"
# uses: azure/webapps-deploy@v2
# with:
# app-name: ${{ secrets.AZURE_WEBAPP_NAME }}
# slot-name: "production"
# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
# package: .
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Continuous Integration

on:
pull_request:

jobs:
continuous-integration:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: "14.x"

- name: install, lint, and test
run: |
yarn
yarn bootstrap
yarn lint
yarn test
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Ignore 3rd party files
node_modules/
.npm/

# Ignore generated files
dist/
tmp/
*.tgz

# Ignore log files
*.err
*.log
*.tmp

# Ignore code editor files
.vscode/
*.sublime-workspace
.vs/

# Ignore OS files
.DS_Store
8 changes: 8 additions & 0 deletions .htmlvalidate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"root": true,
"extends": ["html-validate:recommended"],
"rules": {
"no-inline-style": "off",
"void-style": "off"
}
}
5 changes: 5 additions & 0 deletions .huskyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "lint-staged"
}
}
6 changes: 6 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"package.json": "npmPkgJsonLint",
"*.md": "markdownlint",
"*.{js,jsx,ts,tsx}": "eslint",
"*.css": "stylelint"
}
4 changes: 4 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"default": true,
"MD013": false
}
6 changes: 6 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore 3rd party files
node_modules

# Ignore generated files
dist
CHANGELOG.md
38 changes: 38 additions & 0 deletions .npmpackagejsonlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"rules": {
"require-author": "error",
"require-description": "error",
"require-engines": "off",
"require-license": "error",
"require-name": "error",
"require-repository": "off",
"require-version": "error",
"require-bugs": "off",
"require-homepage": "off",
"require-keywords": "off",
"bin-type": "error",
"config-type": "error",
"description-type": "error",
"devDependencies-type": "error",
"directories-type": "error",
"engines-type": "error",
"files-type": "error",
"homepage-type": "error",
"keywords-type": "error",
"license-type": "error",
"main-type": "error",
"man-type": "error",
"name-type": "error",
"preferGlobal-type": "error",
"private-type": "error",
"repository-type": "error",
"scripts-type": "error",
"version-type": "error",
"valid-values-author": "off",
"valid-values-license": ["error", ["EUPL-1.2"]],
"valid-values-name-scope": ["error", ["@nl-design-system", "@nl-design-system-unstable"]],
"valid-values-private": ["error", [true]],
"name-format": "error",
"version-format": "error"
}
}
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ignore 3rd party files
node_modules

# Ignore generated files
dist
CHANGELOG.md
package.json
package-lock.json
47 changes: 47 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"overrides": [
{
"files": ["*.js"],
"options": {
"parser": "flow",
"printWidth": 120,
"trailingComma": "all",
"tabWidth": 2,
"singleQuote": true
}
},
{
"files": ["*.json"],
"options": {
"parser": "json",
"printWidth": 120,
"tabWidth": 2
}
},
{
"files": ["*.ts"],
"options": {
"parser": "typescript",
"printWidth": 120,
"trailingComma": "all",
"tabWidth": 2,
"singleQuote": true
}
},
{
"files": ["*.css", "*.scss"],
"options": {
"parser": "css",
"tabWidth": 2
}
},
{
"files": ["*.html"],
"options": {
"parser": "html",
"printWidth": 120,
"tabWidth": 2
}
}
]
}
23 changes: 23 additions & 0 deletions .storybook/customTheme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { create } from '@storybook/theming/create';

export default create({
base: 'light',
colorPrimary: '#1b4050',
colorSecondary: '#1b4050',

// UI
appBg: 'white',
appContentBg: 'white',
appBorderColor: 'white',
appBorderRadius: 4,

// Typography
fontBase: '"Helvetica", "Arial", sans-serif',
fontCode: 'monospace',
fontSize: '18px',

brandTitle: 'NL Design System',
brandUrl: 'https://designsystem.gebruikercentraal.nl',
brandImage:
'https://assets.gitlab-static.net/uploads/-/system/project/avatar/16983432/Screen_Shot_2020-02-18_at_13.43.53.png?width=40',
});
18 changes: 18 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
stories: ['../**/*.stories.@(js|mdx)'],
addons: [
'@storybook/addon-notes/register',
'@etchteam/storybook-addon-status/register',
{
name: '@storybook/addon-essentials',
options: {
actions: false,
controls: false,
backgrounds: false,
viewport: false,
},
},
'storybook-addon-mdx-embed',
'storybook-design-token',
],
};
6 changes: 6 additions & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/addons';
import customTheme from './customTheme';

addons.setConfig({
theme: customTheme,
});
1 change: 1 addition & 0 deletions .storybook/preview-body.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link rel="stylesheet" type="text/css" media="screen" href="brand.css" />
Loading

0 comments on commit 94b93ee

Please sign in to comment.