mirror of
https://github.com/facebook/lexical.git
synced 2025-05-17 15:18:47 +08:00
Enable linting for scripts and fix lint errors (#1245)
This commit is contained in:

committed by
acywatson

parent
bf6bf30504
commit
0d03dbe7dd
@ -7,4 +7,3 @@ packages/eslint-plugin-stylex
|
||||
packages/stylex
|
||||
packages/**/vite.config.js
|
||||
**/node_modules
|
||||
scripts/**
|
@ -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,
|
||||
|
@ -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;
|
||||
},
|
||||
|
@ -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`);
|
||||
|
@ -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 = (
|
||||
|
Reference in New Issue
Block a user