YaleDHLab / nhba

A digital archive of New Haven's architecture
https://nhba.yale.edu
4 stars 4 forks source link

Proper Prettier and Linting #328

Closed spaceraccoon closed 6 years ago

duhaime commented 6 years ago

@spaceraccoon Can you please check in before making drastic style changes in the future? We prefer singles to doubles and have strong feelings about whitespace.

spaceraccoon commented 6 years ago

Sure, do you know what is your style guide on white space? I can run it with a single quote setting and the proper white space.

On Feb 7, 2018, at 6:39 AM, Douglas Duhaime notifications@github.com wrote:

@spaceraccoon Can you please check in before making drastic style changes in the future? We prefer singles to doubles and have strong feelings about whitespace.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

duhaime commented 6 years ago

Thanks @spaceraccoon! Here's the eslint config file for our current project:

module.exports = {
  "env": {
    "browser": true,
    "commonjs": true,
    "es6": true,
    "jest": true
  },
  "globals": {
    "process": {
      "env": "development"
    }
  },
  "extends": [
    "eslint:recommended",
  ],
  "rules": {
    "import/extensions": ["error", "always", {
      "js": "never",
      "jsx": "never",
      "mjs": "never"
    }],
    "indent": ["error", 2, { "SwitchCase": 1 }],
    "linebreak-style": ["error", "unix"],
    "max-len": [1, 80, { "ignoreComments": true, "ignoreTrailingComments": true, "ignoreUrls": true }],
    "no-console": ["error", { allow: ["warn"] }],
    "no-empty": ["error", { "allowEmptyCatch": true }],
    "no-undef": ["error", { "typeof": false }],
    "no-unused-vars": ["error", { "varsIgnorePattern": "React" }],
    "no-trailing-spaces": 2,
    "quotes": ["error", "single"],
    "react/jsx-uses-vars": 2,
  },
  "plugins": [
    "react",
    "import",
  ],
  "parser": "babel-eslint",
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true,
      "modules": true
    }
  },
  "settings": {
    "import/resolver": {
      "node": {
        "extensions": [
          ".js",
          ".jsx"
        ]
      }
    }
  }
};

There's unfortunately no linting on NHBA--it would be nice to integrate but I understand there are plenty of fires to put out first...

spaceraccoon commented 6 years ago

Thanks! Apologies jumping the gun here. Yes, they are opening it up to all students next week so running around a lot.

On Wed, Feb 7, 2018 at 11:31 AM, Douglas Duhaime notifications@github.com wrote:

Thanks @spaceraccoon https://github.com/spaceraccoon! Here's the eslint config file for our current project:

module.exports = { "env": { "browser": true, "commonjs": true, "es6": true, "jest": true }, "globals": { "process": { "env": "development" } }, "extends": [ "eslint:recommended", ], "rules": { "import/extensions": ["error", "always", { "js": "never", "jsx": "never", "mjs": "never" }], "indent": ["error", 2, { "SwitchCase": 1 }], "linebreak-style": ["error", "unix"], "max-len": [1, 80, { "ignoreComments": true, "ignoreTrailingComments": true, "ignoreUrls": true }], "no-console": ["error", { allow: ["warn"] }], "no-empty": ["error", { "allowEmptyCatch": true }], "no-undef": ["error", { "typeof": false }], "no-unused-vars": ["error", { "varsIgnorePattern": "React" }], "no-trailing-spaces": 2, "quotes": ["error", "single"], "react/jsx-uses-vars": 2, }, "plugins": [ "react", "import", ], "parser": "babel-eslint", "parserOptions": { "ecmaFeatures": { "jsx": true, "modules": true } }, "settings": { "import/resolver": { "node": { "extensions": [ ".js", ".jsx" ] } } } };

There's unfortunately no linting on NHBA--it would be nice to integrate but I understand there are plenty of fires to put out first...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/YaleDHLab/nhba/issues/328#issuecomment-363826850, or mute the thread https://github.com/notifications/unsubscribe-auth/ARj5GUViC9O8Bx-ohgFjH2LRDJ67RgrJks5tSc_sgaJpZM4R8NQW .

duhaime commented 6 years ago

I hear that--thank you for following up on this and godspeed!