diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000000..00aaa3aee0 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,79 @@ +module.exports = { + root: true, + + extends: 'eslint:recommended', + + parserOptions: { + ecmaVersion: 6, + sourceType: 'script' + }, + + env: { + browser: true, + es6: true + }, + + globals: { + Ext: false, + Sillage: true, + Genois: true, + Cahier: true, + idCtx: true, + digDesinhibePage: true, + digInhibePage: true + }, + + rules: { + //Possible errors + 'comma-dangle': 'warn', + 'no-console': 'off', + 'no-debugger': 'warn', + 'no-extra-semi': 'warn', + 'no-extra-parens': ['warn', 'functions'], + + //Best practices + 'eqeqeq': 'warn', + 'no-new': 'warn', + 'no-eval': 'warn', + 'curly': 'warn', + 'no-alert': 'warn', + 'no-unused-expressions': 'warn', + 'no-else-return': 'warn', + 'no-warning-comments': 'warn', + //Best practices: complexity + 'complexity': ['warn', 10], + 'max-depth': ['warn', 3], + 'max-params': ['warn', 7], + 'default-case': ['warn'], + + //variables + 'no-undef': 'warn', + 'no-unused-vars': ['warn', { + 'vars': 'all', + 'args': 'after-used' + }], + 'no-use-before-define': ['warn', { + 'functions': false, + 'classes': false + }], + + //Stylistic issues + 'no-array-constructor': 'warn', + 'no-mixed-spaces-and-tabs': 'warn', + 'new-cap': ['warn', { + 'newIsCap': true, + 'capIsNew': true + }], + 'semi': 'warn', + 'quotes': ['warn', 'single', {'avoidEscape': true, 'allowTemplateLiterals': true}], + //'quote-props': ['warn', 'as-needed'], + 'indent': ['off', 2], //off : problem with arrays indentation + 'no-trailing-spaces': 'warn', + //'space-before-function-paren': ['warn', 'never'], + 'space-in-parens': ['warn', 'never'], + 'yoda': ['warn', 'never'], + + //ES6 + 'arrow-body-style': ['error', 'as-needed'] + } +} diff --git a/.gitignore b/.gitignore index 6e1a3738b8..620be2d256 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ *.log haters/ +.vscode diff --git a/.tern-project b/.tern-project new file mode 100644 index 0000000000..22bd8f4635 --- /dev/null +++ b/.tern-project @@ -0,0 +1,7 @@ +{ + "ecmaVersion": 6, + "libs": [ + "browser" + ], + "plugins": {} +} \ No newline at end of file diff --git a/01 - JavaScript Drum Kit/index-old.html b/01 - JavaScript Drum Kit/index-old.html new file mode 100644 index 0000000000..a18f2bc2ca --- /dev/null +++ b/01 - JavaScript Drum Kit/index-old.html @@ -0,0 +1,83 @@ + + +
+ +