Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1522] Silence Alloy warnings about non-model files for file names that begin with a period

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterDaniel Pfeiffer
AssigneeFeon Sua Xin Miao
Created2016-07-27T15:16:53.000+0000
Updated2016-10-13T15:59:23.000+0000

Description

During our build process, we're getting a warning from Alloy: {noformat} Non-model file ".eslintrc.json" in models directory {noformat} We are using eslint in our project and need to specify some special settings for the model files. I see in the Alloy source code (commands/compile/index.js:934) that this warning is displayed for each file that doesn't match the RegEx (basically any file that doesn't end in "js"). I could avoid the warning by making it an .eslint.js file, but that would mean it would get copied to the final product (which I'd like to avoid). It seems like it would be a nice addition if files that start with a period are skipped and don't produce warnings.

Attachments

FileDateSize
AC4252.zip2016-08-15T14:54:20.000+0000765837
eslintrc.json2016-09-12T14:43:06.000+0000140

Comments

  1. Sharif AbuDarda 2016-08-11

    Hello, Can you provide a sample test case that reproduce the issue? we will look into it. Thanks.
  2. Daniel Pfeiffer 2016-08-15

    I'm attaching a sample project. This is a new Alloy project with a single .eslintrc.json file in the models directory. (.eslintrc.json is a configuration file for ESLint (http://eslint.org). When you build this project:
       ti build -p ios --build-only --log-level=warn
       
    You will receive the following warning:
       [WARN]  Non-model file ".eslintrc.json" in models directory
       
    Ideally, the Alloy compiler would ignore files that begin with a period since they would not be model files and are likely configuration files for SVN, ESLint, or other tools.
  3. Sharif AbuDarda 2016-09-05

    Hello, Looking into your zip file. I don't see any .eslintrc.json in the models folder inside app folder. The file looks to be a hidden file. Can you attach the file here. Thanks.
  4. Daniel Pfeiffer 2016-09-12

    Here is the file--I've renamed it for the purposes of attaching it here, but in the provided zip file, this file was located here: app/models/.eslintrc.json

JSON Source