Skip to content

Commit

Permalink
build: update build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
mrholek committed May 28, 2021
1 parent 3ff085e commit 7f7136a
Show file tree
Hide file tree
Showing 18 changed files with 4,495 additions and 6,704 deletions.
17 changes: 4 additions & 13 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
module.exports = {
presets: [
[
'@babel/env',
'@babel/preset-env',
{
loose: true,
modules: false,
exclude: ['transform-typeof-symbol']
bugfixes: true,
modules: false
}
]
],
plugins: [
process.env.PLUGINS && 'transform-es2015-modules-strip',
['@babel/proposal-object-rest-spread', {loose: true, useBuiltIns: true}]
].filter(Boolean),
env: {
test: {
plugins: [ 'istanbul' ]
}
}
]
};
11 changes: 11 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://github.com/browserslist/browserslist#readme

>= 0.5%
last 2 major versions
not dead
Chrome >= 60
Firefox >= 60
Firefox ESR
iOS >= 12
Safari >= 12
not Explorer <= 11
36 changes: 19 additions & 17 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"root": true,
"parser": "babel-eslint",
"extends": [
"plugin:import/errors",
"plugin:import/warnings",
"plugin:unicorn/recommended",
"xo/esnext",
"xo",
"xo/browser"
],
"rules": {
Expand All @@ -26,32 +25,35 @@
"error",
"always-multiline"
],
"new-cap": "off",
"no-mixed-operators": "off",
"object-curly-spacing": [
"error",
"always"
],
"prefer-destructuring": [
"new-cap": [
"error",
{
"object": true,
"array": false
"properties": false
}
],
"no-console": "error",
"object-curly-spacing": [
"error",
"always"
],
"semi": [
"error",
"never"
],
"unicorn/consistent-function-scoping": "off",
"unicorn/explicit-length-check": "off",
"unicorn/filename-case": "off",
"unicorn/import-index": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
"unicorn/no-unused-properties": "error",
"unicorn/prefer-includes": "off",
"unicorn/prefer-node-append": "off",
"unicorn/prefer-node-remove": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-dom-node-dataset": "off",
"unicorn/prefer-dom-node-remove": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-text-content": "off",
"unicorn/prefer-spread": "off",
"unicorn/prevent-abbreviations": "off"
}
}
7 changes: 5 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*.css text eol=lf
*.js text eol=lf
# Enforce Unix newlines
* text=auto eol=lf

# Don't diff or textually merge source maps
*.map binary
47 changes: 42 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/.idea
node_modules
dist
.DS_Store

# Logs
logs
*.log
Expand All @@ -13,3 +8,45 @@ lerna-debug.log*

# eslint cache
.eslintcache


# Ignore docs files
/_gh_pages/
# Hugo resources folder
/resources/

# Numerous always-ignore extensions
*.diff
*.err
*.log
*.orig
*.rej
*.swo
*.swp
*.vi
*.zip
*~

# OS or Editor folders
._*
.cache
.DS_Store
.idea
.project
.settings
.tmproj
*.esproj
*.sublime-project
*.sublime-workspace
nbproject
Thumbs.db
/.vscode/

# Komodo
.komodotools
*.komodoproject

# Folders to ignore
/dist/
/js/coverage/
/node_modules/
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Ignore artifacts:
build
coverage

#ignore source
src
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"overrides": [
{
"files": "*.html",
"options": { "parser": "html" }
}
]
}
3 changes: 3 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/*.min.css
**/dist/
**/vendor/
31 changes: 31 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"extends": [
"stylelint-config-twbs-bootstrap/scss"
],
"rules": {
"declaration-property-value-disallowed-list": {
"border": "none",
"outline": "none"
},
"function-disallowed-list": [
"calc",
"lighten",
"darken"
],
"property-disallowed-list": [
"border-radius",
"border-top-left-radius",
"border-top-right-radius",
"border-bottom-right-radius",
"border-bottom-left-radius",
"transition"
],
"scss/dollar-variable-default": [
true,
{
"ignore": "local"
}
],
"scss/selector-no-union-class-name": true
}
}
6 changes: 5 additions & 1 deletion build/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
"parserOptions": {
"sourceType": "script"
},
"extends": "../.eslintrc.json"
"extends": "../.eslintrc.json",
"rules": {
"no-console": "off",
"strict": "error"
}
}
Loading

0 comments on commit 7f7136a

Please sign in to comment.