To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit c8c02193 authored by doerkn's avatar doerkn
Browse files

Merge branch 'fix-boilerplate' into 'master'

updated boilerplate template

See merge request !1
parents 192019b9 03614c7a
module.exports = {
extends: ['airbnb-base', 'plugin:prettier/recommended'],
env: {
browser: true,
node: true,
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
},
rules: {
'no-multi-str': 0,
'no-underscore-dangle': 0,
'no-console': 0,
'import/prefer-default-export': 0,
'import/no-extraneous-dependencies': ['warn', { peerDependencies: true }],
camelcase: 0,
'prettier/prettier': 'error',
},
plugins: ['prettier'],
// Activate the resolver plugin, required to recognize the 'config' resolver
settings: {
'import/resolver': {
webpack: {},
},
},
};
node_modules
dist
.vscode
npm-debug.log
DOCUMENTATION.html
DOCUMENTATION.md
.idea
{
"printWidth": 100,
"parser": "flow",
"singleQuote": true,
"trailingComma": "es5"
}
\ No newline at end of file
{
"rules": {
"color-no-invalid-hex": true,
"font-family-no-duplicate-names": true,
"font-family-no-missing-generic-family-keyword": true,
"function-calc-no-unspaced-operator": true,
"string-no-newline": true,
"unit-no-unknown": true,
"property-no-unknown": true,
"declaration-block-no-duplicate-properties": true,
"declaration-block-no-shorthand-property-overrides": true,
"block-no-empty": true,
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-element-no-unknown": true,
"selector-type-no-unknown": true,
"media-feature-name-no-unknown": true,
"at-rule-no-unknown": true,
"comment-no-empty": true,
"no-duplicate-at-import-rules": true,
"no-duplicate-selectors": true,
"no-empty-source": true,
"no-extra-semicolons": true,
"color-named": "never",
"function-url-no-scheme-relative": true,
"function-url-scheme-blacklist": ["ftp"],
"function-url-scheme-whitelist": ["data", "/^http/"],
"number-max-precision": 2,
"shorthand-property-no-redundant-values": true,
"value-no-vendor-prefix": true,
"property-no-vendor-prefix": true,
"declaration-block-no-redundant-longhand-properties": true,
"declaration-block-single-line-max-declarations": 1,
"selector-max-attribute": 2,
"selector-max-empty-lines": 0,
"selector-max-id": 2,
"selector-max-pseudo-class": 1,
"selector-max-universal": 2,
"selector-no-vendor-prefix": true,
"media-feature-name-no-vendor-prefix": true,
"at-rule-no-vendor-prefix": true,
"comment-word-blacklist": ["/^TODO/"],
"max-nesting-depth": 3,
"no-unknown-animations": true,
"color-hex-case": "lower",
"color-hex-length": "short",
"font-family-name-quotes": "always-where-recommended",
"font-weight-notation": "named-where-possible",
"function-comma-newline-after": "always-multi-line",
"function-comma-newline-before": "never-multi-line",
"function-comma-space-after": "always",
"function-comma-space-before": "never",
"function-max-empty-lines": 0,
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never",
"function-url-quotes": ["always", {
"except": ["empty"]
}],
"function-whitespace-after": "always",
"number-leading-zero": "never",
"number-no-trailing-zeros": true,
"string-quotes": "single",
"length-zero-no-unit": true,
"unit-case": "lower",
"value-keyword-case": "lower",
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-newline-before": "never-multi-line",
"value-list-comma-space-after": "always",
"value-list-comma-space-before": "never",
"value-list-max-empty-lines": 0,
"custom-property-empty-line-before": "never",
"property-case": "lower",
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"declaration-empty-line-before": "never",
"declaration-block-trailing-semicolon": "always",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"block-closing-brace-empty-line-before": "never",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
"block-opening-brace-newline-after": "always-multi-line",
"block-opening-brace-space-after": "always-single-line",
"block-opening-brace-space-before": "always",
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-attribute-quotes": "always",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-descendant-combinator-no-non-space": true,
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-colon-notation": "single",
"selector-type-case": "lower",
"selector-list-comma-newline-after": "always-multi-line",
"selector-list-comma-newline-before": "never-multi-line",
"selector-list-comma-space-after": "never",
"selector-list-comma-space-before": "never",
"rule-empty-line-before": ["always-multi-line", {
"except": ["after-single-line-comment", "first-nested"]
}],
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-name-case": "lower",
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "never-multi-line",
"media-query-list-comma-newline-before": "never-multi-line",
"media-query-list-comma-space-after": "always",
"media-query-list-comma-space-before": "never",
"at-rule-empty-line-before": ["always", {
"ignore": ["after-comment", "first-nested", "blockless-after-blockless"]
}],
"at-rule-name-case": "lower",
"at-rule-name-newline-after": "always-multi-line",
"at-rule-name-space-after": "always-single-line",
"at-rule-semicolon-newline-after": "always",
"at-rule-semicolon-space-before": "never",
"comment-whitespace-inside": "always",
"indentation": 2,
"max-empty-lines": 1,
"no-eol-whitespace": true,
"no-missing-end-of-source-newline": true
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -5,10 +5,14 @@
"license": "MIT",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --hot --inline",
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack -d --watch",
"build": "webpack -p --config webpack.config.prod.js",
"lint": "eslint src/**",
"lint-fix": "eslint --fix src/**"
"server": "webpack-dev-server --hot --inline",
"lint": "npm run eslint && npm run stylelint",
"eslint": "eslint src/*.js src/**/*.js",
"stylelint": "stylelint 'src/**/*.less'",
"format": "prettier --write '**/*.{js,jsx}'"
},
"repository": {
"type": "git",
......@@ -16,24 +20,33 @@
},
"author": "Alexander Dietmüller",
"dependencies": {
"@babel/polyfill": "^7.2.5",
"babel-preset-env": "^1.7.0",
"eslint-loader": "^3.0.2",
"query-string": "^6.0.0"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-preset-env": "^1.6.1",
"compression-webpack-plugin": "^1.1.11",
"css-loader": "^0.28.11",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-import-resolver-webpack": "^0.9.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-import": "^2.11.0",
"file-loader": "^1.1.11",
"style-loader": "^0.19.1",
"uglifyjs-webpack-plugin": "^1.2.5",
"webpack": "^3.11.0",
"webpack-dev-server": "^2.11.2"
"@babel/core": "^7.7.2",
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/preset-env": "^7.7.1",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"css-loader": "^3.2.0",
"eslint": "^6.6.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.5.0",
"eslint-import-resolver-webpack": "^0.11.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.1",
"html-loader": "^0.5.5",
"prettier": "1.19.1",
"less-loader": "^5.0.0",
"robotstxt-webpack-plugin": "^7.0.0",
"style-loader": "^1.0.0",
"stylelint": "^11.1.1",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0",
"webpack-log": "^3.0.1"
}
}
const path = require('path');
const publicPath = '/dist';
const config = {
context: `${__dirname}/src`, // `__dirname` is root of project
entry: './index.js',
entry: ['@babel/polyfill', './index.js'],
output: {
path: `${__dirname}/dist`, // `dist` is the destination
......@@ -22,22 +23,21 @@ const config = {
module: {
rules: [
{
test: /\.js$/,
enforce: 'pre',
exclude: /node_modules/,
loader: 'eslint-loader',
options: {
emitWarning: true, // don't fail the build for linting errors
},
},
{
test: /\.js$/, // Check for all js files
exclude: /node_modules/,
use: [{
loader: 'babel-loader',
options: { presets: ['env'] },
}],
use: [
{
loader: 'babel-loader',
options: {
presets: [['@babel/preset-env', { targets: 'last 2 years' }]],
plugins: [
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-syntax-dynamic-import',
],
},
},
],
include: [path.resolve(__dirname, './src')],
},
{
test: /\.(png|jpe?g|gif|svg)$/,
......@@ -56,7 +56,6 @@ const config = {
use: ['style-loader', 'css-loader'],
},
],
},
resolve: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment