eslint-config-murmuration-frontend v0.0.2
eslint-config-murmuration-frontend
Author
- Harry Stephens
 
Installation
Then, install eslint-config with npm
npm install --save-dev eslint-config-murmuration-frontend
Setup
From wherever you installed eslint-config-murmuration-frontend, run:
sh node_modules/eslint-config-murmuration-frontend/setup.shEnsure that your IDE has the ESLint plugin installed, turned on, using automatic settings in either VS Code or WebStorm.
Visual Studio Code
Verify that ESLint is running by navigating to the Preferences: Open Settings (UI) and make sure the following settings are as follows:
Editor: Default Formatteris set to ESLintEditor: Format On Savebox is tickedEslint: Enablebox is tickedEslint > Format: Enablebox is ticked
WebStorm
Open Preferences and navigate to Languages & Frameworks | JavaScript | Code Quality Tools | ESLint, then set ESLint to Automatic ESLint Configuration.
Make sure the Run eslint --fix on save box is ticked.
Running from the Command Line
eslint ./DIRECTORY_TO_LINT --ext .ts --config .eslintrc.js --fix
Verify Setup
Double check that ESLint is working as expected by creating a new TypeScript file and pasting the following function in it:
// You should get all sorts of errors here.
let myTestFunction = (myTestString) => {
  myTestString = [
    "ESLint should be very upset",
    "about every aspect of this function"
  ]
  
  return myTestString
}
// If you replace the above code with:
const myTestFunction = (myTestString: Array<string>): string => {
  myTestString = [
    'ESLint should be very upset',
    'about every aspect of this function',
  ];
  return myTestString[0];
};
myTestFunction(['This should make', 'ESLint happy']);
// All warnings and errors should disappearLint your little heart out.