private static string GetEcmaDialect(EslintPasringOptions eslintPasringOptions) { var fileName = string.Empty; if (eslintPasringOptions == EslintPasringOptions.DEFAULT) { fileName = "default.eslintrc.json"; } if (eslintPasringOptions == EslintPasringOptions.ECMA6) { fileName = "ecma6.eslintrc.json"; } if (eslintPasringOptions == EslintPasringOptions.REACT) { fileName = "react.eslintrc.json"; } if (eslintPasringOptions == EslintPasringOptions.BABEL_REACT) { fileName = "babel_react.eslintrc.json"; } if (eslintPasringOptions == EslintPasringOptions.NODE) { fileName = "node.eslintrc.json"; } return(fileName); }
private static string GetEcmaDialect(EslintPasringOptions eslintPasringOptions) { var fileName = string.Empty; if (eslintPasringOptions == EslintPasringOptions.DEFAULT) { fileName = "default.eslintrc.json"; } if (eslintPasringOptions == EslintPasringOptions.ECMA6) { fileName = "ecma6.eslintrc.json"; } return(fileName); }
private static string GetFileExtensions(EslintPasringOptions eslintPasringOptions) { // if it is react, babel_react handle js and jsx files, otherwise just don't override the ext param, and let eslint do its default return(eslintPasringOptions == EslintPasringOptions.REACT || eslintPasringOptions == EslintPasringOptions.BABEL_REACT ? " --ext .js,.jsx" : ""); }