.eslint.js threejs coding style

Hi there,

Does somebody have a .eslint.js file (vscode + eslint addon) to have the threejs javascript coding style ?

Here is mine, but not perfect.

module.exports = {
    env: {
        'browser': true,
        'es6': true,
        'node': true
    extends: 'eslint:recommended',
    parserOptions: {
        'sourceType': 'module',
    rules: {
        'indent': ['error', 4],
        'linebreak-style': ['error', 'unix'],
        'quotes': ['error', 'single'],
        'semi': ['error', 'always'],
        'no-unused-vars': ['warn', 'all'],
        'no-var': ['warn'],
        'no-console': 'off',
        'space-in-parens':[ 'error','always' ]
    ignorePatterns: [

Thank you

Adding this to your package.json should be sufficient:

"eslintConfig": {
    "extends": "mdcs"

Just make sure to install eslint and eslint-config-mdcs as dev dependencies.

1 Like

btw :slight_smile: