Enable linting for scripts and fix lint errors (#1245)

This commit is contained in:
Justin Haaheim
2022-02-08 14:58:46 -08:00
committed by acywatson
parent bf6bf30504
commit 0d03dbe7dd
5 changed files with 9 additions and 6 deletions

View File

@ -7,4 +7,3 @@ packages/eslint-plugin-stylex
packages/stylex
packages/**/vite.config.js
**/node_modules
scripts/**

View File

@ -17,7 +17,7 @@ module.exports = {
'no-function-declare-after-return',
'react',
'no-only-tests',
'eslint-plugin-stylex'
'eslint-plugin-stylex',
],
parser: 'babel-eslint',
@ -120,6 +120,13 @@ module.exports = {
strict: OFF,
},
},
{
// node scripts should be console logging so don't lint against that
files: ['scripts/**/*.js'],
rules: {
'no-console': OFF,
},
},
],
globals: {
__DEV__: true,

View File

@ -204,6 +204,7 @@ async function build(name, inputFile, outputFile) {
// Extract error codes from invariant() messages into a file.
{
transform(source) {
// eslint-disable-next-line no-unused-expressions
extractCodes && findAndRecordErrorCodes(source);
return source;
},

View File

@ -3,8 +3,6 @@
'use strict';
const {exec} = require('child-process-promise');
const fs = require('fs');
const path = require('path');
async function prepareLexicalCorePackage() {
await exec(`rm -rf ./packages/lexical/npm`);

View File

@ -3,8 +3,6 @@
'use strict';
const {exec} = require('child-process-promise');
const fs = require('fs');
const path = require('path');
async function prepareBaseBuild() {
const currentBranch = (