Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Proper Prettier and Linting #328

Closed
spaceraccoon opened this issue Feb 7, 2018 · 5 comments
Closed

Proper Prettier and Linting #328

spaceraccoon opened this issue Feb 7, 2018 · 5 comments
Assignees

Comments

@spaceraccoon
Copy link
Collaborator

No description provided.

@duhaime
Copy link
Member

duhaime commented Feb 7, 2018

@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
Copy link
Collaborator Author

spaceraccoon commented Feb 7, 2018 via email

@duhaime
Copy link
Member

duhaime commented Feb 7, 2018

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
Copy link
Collaborator Author

spaceraccoon commented Feb 7, 2018 via email

@spaceraccoon spaceraccoon reopened this Feb 7, 2018
@duhaime
Copy link
Member

duhaime commented Feb 7, 2018

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

@spaceraccoon spaceraccoon changed the title Run prettier on all files Proper Prettier and Linting Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants